Highlight the current list when something list related is called
This commit is contained in:
@ -5,7 +5,7 @@ Vue.use(Vuex)
|
||||
import config from './modules/config'
|
||||
import auth from './modules/auth'
|
||||
import namespaces from './modules/namespaces'
|
||||
import {ERROR_MESSAGE, IS_FULLPAGE, LOADING, ONLINE} from './mutation-types'
|
||||
import {CURRENT_LIST, ERROR_MESSAGE, IS_FULLPAGE, LOADING, ONLINE} from './mutation-types'
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
@ -18,6 +18,8 @@ export const store = new Vuex.Store({
|
||||
errorMessage: '',
|
||||
online: true,
|
||||
isFullpage: false,
|
||||
// This is used to highlight the current list in menu for all list related views
|
||||
currentList: 0,
|
||||
},
|
||||
mutations: {
|
||||
[LOADING](state, loading) {
|
||||
@ -31,6 +33,9 @@ export const store = new Vuex.Store({
|
||||
},
|
||||
[IS_FULLPAGE](state, fullpage) {
|
||||
state.isFullpage = fullpage
|
||||
}
|
||||
},
|
||||
[CURRENT_LIST](state, currentList) {
|
||||
state.currentList = currentList
|
||||
},
|
||||
},
|
||||
})
|
@ -2,6 +2,7 @@ export const LOADING = 'loading'
|
||||
export const ERROR_MESSAGE = 'errorMessage'
|
||||
export const ONLINE = 'online'
|
||||
export const IS_FULLPAGE = 'isFullpage'
|
||||
export const CURRENT_LIST = 'currentList'
|
||||
|
||||
export const CONFIG = 'config'
|
||||
export const AUTH = 'auth'
|
||||
|
Reference in New Issue
Block a user