* Added Much better session Management, key updating and deleting

* Force reload of JS if app numbers dont match
* Added cool tag display on side of note
* Cleaned up a bunch of code and tweaked little things to be better
This commit is contained in:
Max G
2020-06-15 09:02:20 +00:00
parent 56d4664d0d
commit e4fae23623
18 changed files with 333 additions and 270 deletions

View File

@@ -248,7 +248,7 @@
<div v-on:click="reloadPage" class="version-display">
<div v-on:click="reloadPage" class="version-display" v-if="version != 0" >
<i :class="`${getVersionIcon()} icon`"></i> {{ version }}
</div>
@@ -267,7 +267,7 @@
},
data: function(){
return {
version: '2.3.4',
version: '0',
username: '',
collapsed: false,
mobile: false,
@@ -277,6 +277,7 @@
}
},
beforeCreate: function(){
},
mounted: function(){
this.mobile = this.$store.getters.getIsUserOnMobile
@@ -288,6 +289,7 @@
if(this.loggedIn){
this.$store.dispatch('fetchAndUpdateUserTotals')
this.version = localStorage.getItem('currentVersion')
}
},
@@ -347,11 +349,12 @@
.catch(error => { this.$bus.$emit('notification', 'Failed to create note') })
},
destroyLoginToken() {
axios.post('/api/user/logout').then( response => {
axios.post('/api/user/logout')
setTimeout(() => {
this.$bus.$emit('notification', 'Logged Out')
this.$store.commit('destroyLoginToken')
this.$router.push('/')
})
}, 200)
},
toggleNightMode(){
this.$store.commit('toggleNightMode')