diff options
Diffstat (limited to 'viewer/src/store/galleryStore.ts')
-rw-r--r-- | viewer/src/store/galleryStore.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts index bc43ed2..4a5de0f 100644 --- a/viewer/src/store/galleryStore.ts +++ b/viewer/src/store/galleryStore.ts | |||
@@ -95,7 +95,15 @@ export default class GalleryStore extends VuexModule { | |||
95 | // Indexes the gallery | 95 | // Indexes the gallery |
96 | @action async indexTags() { | 96 | @action async indexTags() { |
97 | const root = this.galleryIndex?.tree ?? null; | 97 | const root = this.galleryIndex?.tree ?? null; |
98 | this.setTagsIndex(IndexFactory.generateTags(root)); | 98 | const index = IndexFactory.generateTags(root); |
99 | this.setTagsIndex(index); | ||
100 | return index; | ||
99 | } | 101 | } |
100 | 102 | ||
103 | // Searches for tags | ||
104 | @action async search(filters: string[]) { | ||
105 | const results = filters.flatMap(filter => IndexFactory.searchTags(this.tagsIndex, filter, true)); | ||
106 | this.setCurrentSearch(results); | ||
107 | return results; | ||
108 | } | ||
101 | } | 109 | } |