mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-24 22:25:16 +02:00
⚡ Adds mutation key for INITIALIZE_CONFIG
This commit is contained in:
parent
159748e3de
commit
08da96da2d
@ -65,7 +65,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$store.dispatch('initializeConfig');
|
this.$store.dispatch(Keys.INITIALIZE_CONFIG);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/* Injects the users custom CSS as a style tag */
|
/* Injects the users custom CSS as a style tag */
|
||||||
|
@ -9,6 +9,7 @@ import filterUserSections from '@/utils/CheckSectionVisibility';
|
|||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
INITIALIZE_CONFIG,
|
||||||
UPDATE_CONFIG,
|
UPDATE_CONFIG,
|
||||||
SET_MODAL_OPEN,
|
SET_MODAL_OPEN,
|
||||||
SET_LANGUAGE,
|
SET_LANGUAGE,
|
||||||
@ -79,7 +80,7 @@ const store = new Vuex.Store({
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
/* Called when app first loaded. Reads config and sets state */
|
/* Called when app first loaded. Reads config and sets state */
|
||||||
initializeConfig({ commit }) {
|
[INITIALIZE_CONFIG]({ commit }) {
|
||||||
const Accumulator = new ConfigAccumulator();
|
const Accumulator = new ConfigAccumulator();
|
||||||
const config = Accumulator.config();
|
const config = Accumulator.config();
|
||||||
commit(UPDATE_CONFIG, config);
|
commit(UPDATE_CONFIG, config);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// A list of mutation names
|
// A list of mutation names
|
||||||
const KEY_NAMES = [
|
const KEY_NAMES = [
|
||||||
|
'INITIALIZE_CONFIG',
|
||||||
'UPDATE_CONFIG',
|
'UPDATE_CONFIG',
|
||||||
'SET_MODAL_OPEN',
|
'SET_MODAL_OPEN',
|
||||||
'SET_LANGUAGE',
|
'SET_LANGUAGE',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user