mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-21 01:12:14 +00:00
Initial commit
This commit is contained in:
35
resources/js/store/modules/app.js
vendored
Normal file
35
resources/js/store/modules/app.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import axios from 'axios'
|
||||
import { events } from '@/bus'
|
||||
|
||||
const defaultState = {
|
||||
currentView: 'files',
|
||||
appSize: undefined,
|
||||
config: undefined,
|
||||
}
|
||||
const actions = {
|
||||
|
||||
}
|
||||
const mutations = {
|
||||
SET_CONFIG(state, config) {
|
||||
state.config = config
|
||||
},
|
||||
SET_CURRENT_VIEW(state, view) {
|
||||
state.currentView = view
|
||||
},
|
||||
SET_APP_WIDTH(state, scale) {
|
||||
state.appSize = scale
|
||||
},
|
||||
}
|
||||
const getters = {
|
||||
currentView: state => state.currentView,
|
||||
appSize: state => state.appSize,
|
||||
api: state => state.config.api,
|
||||
config: state => state.config,
|
||||
}
|
||||
|
||||
export default {
|
||||
state: defaultState,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
||||
Reference in New Issue
Block a user