diff options
author | Zero~Informatique | 2019-12-21 02:06:02 +0100 |
---|---|---|
committer | Zero~Informatique | 2019-12-21 02:06:02 +0100 |
commit | 62005141132da1e9761598fa3e4b35b4dab38a89 (patch) | |
tree | 3ff8b9f3acd07801075202f9eb2d2f2dfd328ff5 /viewer/src/plugins | |
parent | bdce958eddc527912a57afa5b8151e1a90e38355 (diff) | |
download | ldgallery-62005141132da1e9761598fa3e4b35b4dab38a89.tar.gz |
Implemented VueX and a basic UIStore with the fullscreen mutation
Some renaming
Diffstat (limited to 'viewer/src/plugins')
-rw-r--r-- | viewer/src/plugins/fontawesome.ts (renamed from viewer/src/plugins/fontawesome.js) | 0 | ||||
-rw-r--r-- | viewer/src/plugins/vuex.ts | 23 |
2 files changed, 23 insertions, 0 deletions
diff --git a/viewer/src/plugins/fontawesome.js b/viewer/src/plugins/fontawesome.ts index 9bf4dba..9bf4dba 100644 --- a/viewer/src/plugins/fontawesome.js +++ b/viewer/src/plugins/fontawesome.ts | |||
diff --git a/viewer/src/plugins/vuex.ts b/viewer/src/plugins/vuex.ts new file mode 100644 index 0000000..9b2fa46 --- /dev/null +++ b/viewer/src/plugins/vuex.ts | |||
@@ -0,0 +1,23 @@ | |||
1 | import Vue from 'vue' | ||
2 | import Vuex from 'vuex' | ||
3 | import { extractVuexModule } from "vuex-class-component"; | ||
4 | import { createProxy } from "vuex-class-component"; | ||
5 | import UIStore from '@/store/uiStore'; | ||
6 | |||
7 | Vue.use(Vuex) | ||
8 | |||
9 | const store = new Vuex.Store({ | ||
10 | modules: { | ||
11 | ...extractVuexModule(UIStore) | ||
12 | } | ||
13 | }); | ||
14 | |||
15 | Vue.use((vue) => vue.prototype.$uiStore = createProxy(store, UIStore)); | ||
16 | |||
17 | declare module 'vue/types/vue' { | ||
18 | interface Vue { | ||
19 | $uiStore: UIStore | ||
20 | } | ||
21 | } | ||
22 | |||
23 | export default store; | ||