Lots of little ease of use tweaks

This commit is contained in:
Max G committed 2022-02-25 02:33:49 +00:00
1 parent c1797474b8
commit bc44b3db9a
15 files changed
+546 -161

No files matched your search

+9
View File
@@ -10,6 +10,7 @@ export default new Vuex.Store({
nightMode: false,
isUserOnMobile: false,
userTotals: null,
activeSessions: 0,
},
mutations: {
setUsername(state, username){
@@ -24,6 +25,7 @@ export default new Vuex.Store({
localStorage.removeItem('loginToken')
localStorage.removeItem('username')
localStorage.removeItem('currentVersion')
localStorage.removeItem('snippetCache')
delete axios.defaults.headers.common['authorizationtoken']
state.username = null
state.userTotals = null
@@ -119,6 +121,10 @@ export default new Vuex.Store({
// Object.keys(totalsObject).forEach( key => {
// console.log(key + ' -- ' + totalsObject[key])
// })
},
setActiveSessions(state, countData){
//Count of the number of active socket.io sessions for this user
state.activeSessions = countData
}
},
getters: {
@@ -144,6 +150,9 @@ export default new Vuex.Store({
totals: state => {
return state.userTotals
},
getActiveSessions: state => {
return state.activeSessions
}
},
actions: {
fetchAndUpdateUserTotals ({ commit }) {