diff options
Diffstat (limited to 'viewer/src/components/LdProposition.vue')
-rw-r--r-- | viewer/src/components/LdProposition.vue | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue index 02f7fe4..6be0aee 100644 --- a/viewer/src/components/LdProposition.vue +++ b/viewer/src/components/LdProposition.vue | |||
@@ -37,10 +37,10 @@ | |||
37 | 37 | ||
38 | <script lang="ts"> | 38 | <script lang="ts"> |
39 | import { Component, Vue } from "vue-property-decorator"; | 39 | import { Component, Vue } from "vue-property-decorator"; |
40 | import { Operation } from "@/@types/tag/Operation"; | 40 | import { Operation } from "@/@types/Operation"; |
41 | 41 | ||
42 | @Component | 42 | @Component |
43 | export default class LdTagInput extends Vue { | 43 | export default class LdProposition extends Vue { |
44 | get Operation() { | 44 | get Operation() { |
45 | return Operation; | 45 | return Operation; |
46 | } | 46 | } |
@@ -56,8 +56,10 @@ export default class LdTagInput extends Vue { | |||
56 | .filter(rawTag => !currentTags.find(currentTag => currentTag.tag === rawTag)) | 56 | .filter(rawTag => !currentTags.find(currentTag => currentTag.tag === rawTag)) |
57 | .forEach(rawTag => (propositions[rawTag] = (propositions[rawTag] ?? 0) + 1)); | 57 | .forEach(rawTag => (propositions[rawTag] = (propositions[rawTag] ?? 0) + 1)); |
58 | } else { | 58 | } else { |
59 | // Tags count from the whole gallery | 59 | // Tags count from the current directory |
60 | Object.entries(this.$galleryStore.tags).forEach(entry => (propositions[entry[0]] = entry[1].items.length)); | 60 | this.$galleryStore.currentItem?.tags |
61 | .map(tag => this.$galleryStore.tags[tag]) // FIXME: Folders with the same name are merged in the index | ||
62 | .forEach(tagindex => (propositions[tagindex.tag] = tagindex.items.length)); | ||
61 | } | 63 | } |
62 | 64 | ||
63 | return Object.entries(propositions) | 65 | return Object.entries(propositions) |