fix logout stuff

This commit is contained in:
2024-08-14 14:30:14 +02:00
parent 070e9d158b
commit 1567640634
2 changed files with 6 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
<div style="margin-top: 20px;">
<a href="https://store.janishutz.com/product/com.janishutz.MusicPlayer" class="fancy-button" target="_blank">Subscribe</a>
<a href="/" class="fancy-button" style="margin-left: 10px;" v-if="!reasonForRedirectHere">Log in</a>
<button href="/" class="fancy-button" style="margin-left: 10px;" v-if="!reasonForRedirectHere" @click="logout()">Log out</button>
<a href="https://github.com/simplePCBuilding/MusicPlayerV2" class="fancy-button" style="margin-left: 10px;" target="_blank">GitHub</a>
</div>
</div>
@@ -39,6 +40,10 @@
} );
const reasonForRedirectHere = ref( sessionStorage.getItem( 'getRedirectionReason' ) );
sessionStorage.removeItem( 'getRedirectionReason' );
const logout = () => {
location.href = localStorage.getItem( 'url' ) + '/logout?return=' + location.href;
}
</script>
<style scoped>