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/store | |
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/store')
-rw-r--r-- | viewer/src/store/uiStore.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts new file mode 100644 index 0000000..c4143a1 --- /dev/null +++ b/viewer/src/store/uiStore.ts | |||
@@ -0,0 +1,15 @@ | |||
1 | import { createModule, mutation, action } from "vuex-class-component"; | ||
2 | |||
3 | const VuexModule = createModule({ | ||
4 | namespaced: "uiStore", | ||
5 | strict: true | ||
6 | }) | ||
7 | |||
8 | export default class UIStore extends VuexModule { | ||
9 | |||
10 | fullscreen: boolean = false; | ||
11 | |||
12 | @mutation toggleFullscreen() { | ||
13 | this.fullscreen = !this.fullscreen; | ||
14 | } | ||
15 | } | ||