aboutsummaryrefslogtreecommitdiffhomepage
path: root/desktop_editor/src/store.ts
diff options
context:
space:
mode:
Diffstat (limited to 'desktop_editor/src/store.ts')
-rw-r--r--desktop_editor/src/store.ts38
1 files changed, 38 insertions, 0 deletions
diff --git a/desktop_editor/src/store.ts b/desktop_editor/src/store.ts
new file mode 100644
index 0000000..976d9eb
--- /dev/null
+++ b/desktop_editor/src/store.ts
@@ -0,0 +1,38 @@
+import { createStore } from 'vuex'
+
+
+export default createStore({
+ state: {
+ currentPreset: null,
+ currentSetlits: null,
+ modelRepo: null,
+ },
+ getters: {
+ currentPreset: state => state.currentPreset,
+ currentSetlits: state => state.currentSetlits,
+ modelRepo: state => state.modelRepo,
+ },
+ mutations: {
+ SET_PRESET(state, preset) {
+ state.currentPreset = preset;
+ },
+ SET_SETLIST(state, setlits) {
+ state.currentSetlits = setlits;
+ },
+ SET_MODEL_REPO(state, modelRepo) {
+ state.modelRepo = modelRepo;
+ }
+ },
+ actions: {
+ setSelectedPreset(context, preset) {
+ context.commit('SET_PRESET', preset);
+ },
+ setSelectedSetlist(context, setlits) {
+ context.commit('SET_SETLIST', setlits);
+ },
+ setModelRepo(context, modelRepo) {
+ context.commit('SET_MODEL_REPO', modelRepo);
+ }
+ },
+})
+