fix: code linting
This commit is contained in:
@@ -18,11 +18,11 @@ export default {
|
||||
state,
|
||||
mutations: {
|
||||
...make.mutations(state),
|
||||
pushMediaFolderTree: (state, folder) => {
|
||||
state.media.folderTree = state.media.folderTree.concat(folder)
|
||||
pushMediaFolderTree: (st, folder) => {
|
||||
st.media.folderTree = st.media.folderTree.concat(folder)
|
||||
},
|
||||
popMediaFolderTree: (state) => {
|
||||
state.media.folderTree = state.media.folderTree.slice(0, -1)
|
||||
popMediaFolderTree: (st) => {
|
||||
st.media.folderTree = st.media.folderTree.slice(0, -1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -33,24 +33,24 @@ export default new Vuex.Store({
|
||||
},
|
||||
mutations: {
|
||||
...make.mutations(state),
|
||||
loadingStart (state, stackName) {
|
||||
state.loadingStack = _.union(state.loadingStack, [stackName])
|
||||
loadingStart (st, stackName) {
|
||||
st.loadingStack = _.union(st.loadingStack, [stackName])
|
||||
},
|
||||
loadingStop (state, stackName) {
|
||||
state.loadingStack = _.without(state.loadingStack, stackName)
|
||||
loadingStop (st, stackName) {
|
||||
st.loadingStack = _.without(st.loadingStack, stackName)
|
||||
},
|
||||
showNotification (state, opts) {
|
||||
state.notification = _.defaults(opts, {
|
||||
showNotification (st, opts) {
|
||||
st.notification = _.defaults(opts, {
|
||||
message: '',
|
||||
style: 'primary',
|
||||
icon: 'cached',
|
||||
isActive: true
|
||||
})
|
||||
},
|
||||
updateNotificationState (state, newState) {
|
||||
state.notification.isActive = newState
|
||||
updateNotificationState (st, newState) {
|
||||
st.notification.isActive = newState
|
||||
},
|
||||
pushGraphError (state, err) {
|
||||
pushGraphError (st, err) {
|
||||
WIKI.$store.commit('showNotification', {
|
||||
style: 'red',
|
||||
message: _.get(err, 'graphQLErrors[0].message', err.message),
|
||||
|
@@ -20,21 +20,21 @@ export default {
|
||||
state,
|
||||
mutations: {
|
||||
...make.mutations(state),
|
||||
REFRESH_AUTH(state) {
|
||||
REFRESH_AUTH(st) {
|
||||
const jwtCookie = Cookies.get('jwt')
|
||||
if (jwtCookie) {
|
||||
try {
|
||||
const jwtData = jwt.decode(jwtCookie)
|
||||
state.id = jwtData.id
|
||||
state.email = jwtData.email
|
||||
state.name = jwtData.name
|
||||
state.pictureUrl = jwtData.pictureUrl
|
||||
state.localeCode = jwtData.localeCode
|
||||
state.defaultEditor = jwtData.defaultEditor
|
||||
state.permissions = jwtData.permissions
|
||||
state.iat = jwtData.iat
|
||||
state.exp = jwtData.exp
|
||||
state.authenticated = true
|
||||
st.id = jwtData.id
|
||||
st.email = jwtData.email
|
||||
st.name = jwtData.name
|
||||
st.pictureUrl = jwtData.pictureUrl
|
||||
st.localeCode = jwtData.localeCode
|
||||
st.defaultEditor = jwtData.defaultEditor
|
||||
st.permissions = jwtData.permissions
|
||||
st.iat = jwtData.iat
|
||||
st.exp = jwtData.exp
|
||||
st.authenticated = true
|
||||
} catch (err) {
|
||||
console.debug('Invalid JWT. Silent authentication skipped.')
|
||||
}
|
||||
|
Reference in New Issue
Block a user