diff options
author | Zero~Informatique | 2019-12-28 04:52:30 +0100 |
---|---|---|
committer | Zero~Informatique | 2019-12-28 04:53:01 +0100 |
commit | a681accaa7617892bb7c53248aa9030a4eb47f50 (patch) | |
tree | 0d04aee1ef36ffaae1b0fac0a61ef7dad8d38e7c /viewer/src/store | |
parent | deaed8a6737edc6e28c08e9c6734dde6e37a4016 (diff) | |
download | ldgallery-a681accaa7617892bb7c53248aa9030a4eb47f50.tar.gz |
viewer: Tag propositions. Disabled directory indexation.
Note: The propositions are not based on the current search results, but on the searched tags, which doesn't seem to be the correct way. We'll probably have to move the search results to a store for global visibility.
Diffstat (limited to 'viewer/src/store')
-rw-r--r-- | viewer/src/store/galleryStore.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts index 8a611ea..179fbe2 100644 --- a/viewer/src/store/galleryStore.ts +++ b/viewer/src/store/galleryStore.ts | |||
@@ -44,6 +44,10 @@ export default class GalleryStore extends VuexModule { | |||
44 | // Pushes all tags for a root item (and its children) to the index | 44 | // Pushes all tags for a root item (and its children) to the index |
45 | private static pushTagsForItem(index: Tag.Index, item: Gallery.Item) { | 45 | private static pushTagsForItem(index: Tag.Index, item: Gallery.Item) { |
46 | console.log("IndexingTagsFor: ", item.path); | 46 | console.log("IndexingTagsFor: ", item.path); |
47 | if (item.properties.type === "directory") { | ||
48 | item.properties.items.forEach(item => this.pushTagsForItem(index, item)); | ||
49 | return; // Directories are not indexed | ||
50 | } | ||
47 | for (const tag of item.tags) { | 51 | for (const tag of item.tags) { |
48 | const parts = tag.split('.'); | 52 | const parts = tag.split('.'); |
49 | let lastPart: string | null = null; | 53 | let lastPart: string | null = null; |
@@ -54,8 +58,6 @@ export default class GalleryStore extends VuexModule { | |||
54 | lastPart = part; | 58 | lastPart = part; |
55 | } | 59 | } |
56 | } | 60 | } |
57 | if (item.properties.type === "directory") | ||
58 | item.properties.items.forEach(item => this.pushTagsForItem(index, item)); | ||
59 | } | 61 | } |
60 | 62 | ||
61 | // Searches for an item by path from a root item (navigation) | 63 | // Searches for an item by path from a root item (navigation) |