aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/store/galleryStore.ts
diff options
context:
space:
mode:
authorZero~Informatique2021-07-02 22:59:56 +0200
committerZero~Informatique2021-07-03 00:05:22 +0200
commit92cb34b719b481faf417760f307241e8f6d777a9 (patch)
treeba33af35b8bb07e6c1c19b84f6c3af37c791584c /viewer/src/store/galleryStore.ts
parent9165cc1efcf7791f78b61b2c51a9de651b1b09aa (diff)
downloadldgallery-92cb34b719b481faf417760f307241e8f6d777a9.tar.gz
viewer: types normalization - tag.d.ts
GitHub: closes #301
Diffstat (limited to 'viewer/src/store/galleryStore.ts')
-rw-r--r--viewer/src/store/galleryStore.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts
index 3ef2036..e2adf18 100644
--- a/viewer/src/store/galleryStore.ts
+++ b/viewer/src/store/galleryStore.ts
@@ -18,6 +18,7 @@
18*/ 18*/
19 19
20import { Config, Index, Item } from "@/@types/gallery"; 20import { Config, Index, Item } from "@/@types/gallery";
21import { TagCategory, TagIndex, TagSearch } from "@/@types/tag";
21import IndexFactory from "@/services/indexfactory"; 22import IndexFactory from "@/services/indexfactory";
22import Navigation from "@/services/navigation"; 23import Navigation from "@/services/navigation";
23import { action, createModule, mutation } from "vuex-class-component"; 24import { action, createModule, mutation } from "vuex-class-component";
@@ -30,10 +31,10 @@ const VuexModule = createModule({
30export default class GalleryStore extends VuexModule { 31export default class GalleryStore extends VuexModule {
31 config: Config | null = null; 32 config: Config | null = null;
32 galleryIndex: Index | null = null; 33 galleryIndex: Index | null = null;
33 tagsIndex: Tag.Index = {}; 34 tagsIndex: TagIndex = {};
34 tagsCategories: Tag.Category[] = []; 35 tagsCategories: TagCategory[] = [];
35 currentPath: string | null = null; 36 currentPath: string | null = null;
36 currentSearch: Tag.Search[] = []; 37 currentSearch: TagSearch[] = [];
37 38
38 // --- 39 // ---
39 40
@@ -45,11 +46,11 @@ export default class GalleryStore extends VuexModule {
45 this.galleryIndex = Object.freeze(galleryIndex); 46 this.galleryIndex = Object.freeze(galleryIndex);
46 } 47 }
47 48
48 @mutation private setTagsIndex(tagsIndex: Tag.Index) { 49 @mutation private setTagsIndex(tagsIndex: TagIndex) {
49 this.tagsIndex = Object.freeze(tagsIndex); 50 this.tagsIndex = Object.freeze(tagsIndex);
50 } 51 }
51 52
52 @mutation private setTagsCategories(tagsCategories: Tag.Category[]) { 53 @mutation private setTagsCategories(tagsCategories: TagCategory[]) {
53 this.tagsCategories = tagsCategories; 54 this.tagsCategories = tagsCategories;
54 } 55 }
55 56
@@ -57,7 +58,7 @@ export default class GalleryStore extends VuexModule {
57 this.currentPath = currentPath; 58 this.currentPath = currentPath;
58 } 59 }
59 60
60 @mutation setCurrentSearch(currentSearch: Tag.Search[]) { 61 @mutation setCurrentSearch(currentSearch: TagSearch[]) {
61 this.currentSearch = currentSearch; 62 this.currentSearch = currentSearch;
62 } 63 }
63 64