aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/store/index.ts
diff options
context:
space:
mode:
authorZero~Informatique2019-12-21 08:08:54 +0100
committerZero~Informatique2019-12-21 08:08:54 +0100
commit9e4fdd6f38853d8a4a959901ab7902569de75484 (patch)
tree3255e7fc08a6767ce8c333a42388f6398d2b460e /viewer/src/store/index.ts
parent40e8303d6b37a062754fdfbe824a153b8e5e2ddf (diff)
downloadldgallery-9e4fdd6f38853d8a4a959901ab7902569de75484.tar.gz
viewer:
Implemented the "example" project in devServer Display loader and error messages (not translated yet) Created a "GalleryStore" to fetch the JSon data from the gallery (currently from example)
Diffstat (limited to 'viewer/src/store/index.ts')
-rw-r--r--viewer/src/store/index.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/viewer/src/store/index.ts b/viewer/src/store/index.ts
new file mode 100644
index 0000000..cadd8e3
--- /dev/null
+++ b/viewer/src/store/index.ts
@@ -0,0 +1,27 @@
1import Vue from 'vue'
2import Vuex from 'vuex'
3import { extractVuexModule } from "vuex-class-component";
4import { createProxy } from "vuex-class-component";
5import UIStore from '@/store/uiStore';
6import GalleryStore from '@/store/galleryStore';
7
8Vue.use(Vuex)
9
10const store = new Vuex.Store({
11 modules: {
12 ...extractVuexModule(UIStore),
13 ...extractVuexModule(GalleryStore)
14 }
15});
16
17Vue.use((vue) => vue.prototype.$uiStore = createProxy(store, UIStore));
18Vue.use((vue) => vue.prototype.$galleryStore = createProxy(store, GalleryStore));
19
20declare module 'vue/types/vue' {
21 interface Vue {
22 $uiStore: UIStore,
23 $galleryStore: GalleryStore
24 }
25}
26
27export default store;