Hello,
First of all, thank you for this very good framework.
Let me explain, I have a vuejs application with a panel on the right. In this panel, I added a disconnection link for the user. Now, I would like to hide it when it is disconnected. I know if the user is connected when his token exists in the localstorage.
So, I tried to use v-show on localstorage but it doesn’t work
For more information, here is the line I use to retrieve my token. If present, the boolean isUserAuthentificated
is equal to true :
JSON.parse(localStorage.OAuthData).accessToken
Here is the code of my panel :
<template>
<f7-page>
<f7-navbar title="Left Panel" class="color-theme-green"></f7-navbar>
<f7-block-title>Account</f7-block-title>
<f7-list>
<f7-list-item link="/logout/">Language</f7-list-item>
<f7-list-item v-on:click="spotifyLogout">Logout</f7-list-item>
</f7-list>
</f7-page>
</template>
<script>
export default {
methods: {
spotifyLogout: function() {
window.cordova.plugins.spotifyAuth.forget();
this.$f7.views.main.router.navigate('/');
this.$f7.panel.close();
}
},
}
</script>
My question is therefore the following, what would you advise me to hide the “logout” link if the user is not yet logged in please?
Best regards,