mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
34 lines
614 B
JavaScript
Vendored
34 lines
614 B
JavaScript
Vendored
const defaultState = {
|
|
isRunningConnection: false,
|
|
}
|
|
|
|
const actions = {
|
|
runConnection: ({ commit, getters, dispatch }) => {
|
|
|
|
commit('SET_RUNNING_COMMUNICATION')
|
|
|
|
Echo.private(`App.Users.Models.User.${getters.user.data.id}`)
|
|
.notification(() => {
|
|
// TODO: call sound
|
|
dispatch('getAppData')
|
|
});
|
|
},
|
|
}
|
|
|
|
const mutations = {
|
|
SET_RUNNING_COMMUNICATION(state) {
|
|
state.isRunningConnection = true
|
|
},
|
|
}
|
|
|
|
const getters = {
|
|
isRunningConnection: (state) => state.isRunningConnection,
|
|
}
|
|
|
|
export default {
|
|
state: defaultState,
|
|
getters,
|
|
actions,
|
|
mutations,
|
|
}
|