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

@@ -100,8 +100,7 @@
} ); } );
const logout = () => { const logout = () => {
location.href = 'http://localhost:8080/logout?return=http://localhost:8081'; location.href = localStorage.getItem( 'url' ) + '/logout?return=' + location.href;
// location.href = 'https://id.janishutz.com/logout?return=https://music.janishutz.com';
} }
</script> </script>

View File

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