2017-06-30 09:25:35 +00:00
|
|
|
import Vue from 'vue'
|
|
|
|
import Vuex from 'vuex'
|
2017-06-30 11:43:43 +00:00
|
|
|
import mutations from './mutations'
|
2017-06-30 14:09:00 +00:00
|
|
|
import getters from './getters'
|
2017-06-30 09:25:35 +00:00
|
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
|
|
|
|
|
const state = {
|
2017-07-03 09:40:24 +00:00
|
|
|
user: {},
|
|
|
|
req: {},
|
|
|
|
baseURL: document.querySelector('meta[name="base"]').getAttribute('content'),
|
2017-06-30 09:25:35 +00:00
|
|
|
ssl: (window.location.protocol === 'https:'),
|
2017-07-03 10:04:14 +00:00
|
|
|
jwt: '',
|
2017-07-03 14:57:07 +00:00
|
|
|
reload: false,
|
2017-06-30 09:25:35 +00:00
|
|
|
selected: [],
|
|
|
|
multiple: false,
|
|
|
|
showInfo: false,
|
|
|
|
showHelp: false,
|
|
|
|
showDelete: false,
|
|
|
|
showRename: false,
|
|
|
|
showMove: false,
|
|
|
|
showNewFile: false,
|
2017-06-30 15:04:01 +00:00
|
|
|
showNewDir: false,
|
|
|
|
showDownload: false
|
2017-06-30 09:25:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default new Vuex.Store({
|
|
|
|
strict: process.env.NODE_ENV !== 'production',
|
|
|
|
state,
|
|
|
|
getters,
|
|
|
|
mutations
|
|
|
|
})
|