init simple appreports
This commit is contained in:
+23
-10
@@ -1,15 +1,28 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
/*
|
||||
* Copyright (C) Sapphirecode - All Rights Reserved
|
||||
* This file is part of appreports which is released under GPL-3.0-or-later.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@scode.ovh>, July 2020
|
||||
*/
|
||||
|
||||
Vue.use(Vuex)
|
||||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
},
|
||||
Vue.use (Vuex);
|
||||
|
||||
export default new Vuex.Store ({
|
||||
state: { log: [] },
|
||||
mutations: {
|
||||
set_log (state, log) {
|
||||
state.log = log;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
actions: {
|
||||
async get_log ({ commit }) {
|
||||
const log = await fetch ('log')
|
||||
.then ((res) => res.json ());
|
||||
commit ('set_log', log);
|
||||
}
|
||||
},
|
||||
modules: {
|
||||
}
|
||||
})
|
||||
modules: {}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user