aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdProposition.vue
diff options
context:
space:
mode:
authorNotkea2020-01-31 18:09:33 +0100
committerGitHub2020-01-31 18:09:33 +0100
commit245fee3fe5abdc6ad14513ef6522446aba4c905a (patch)
tree749ec466c404499f19d571834262b87c14f0d0af /viewer/src/components/LdProposition.vue
parentd94b987463169b254ab69a79ddb58e5beccb0941 (diff)
parentbe8ec3edaed843f08dac3d2bf2f10f7247ef3d3a (diff)
downloadldgallery-245fee3fe5abdc6ad14513ef6522446aba4c905a.tar.gz
Merge pull request #68 from pacien/oz-viewer
Diffstat (limited to 'viewer/src/components/LdProposition.vue')
-rw-r--r--viewer/src/components/LdProposition.vue10
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">
39import { Component, Vue } from "vue-property-decorator"; 39import { Component, Vue } from "vue-property-decorator";
40import { Operation } from "@/@types/tag/Operation"; 40import { Operation } from "@/@types/Operation";
41 41
42@Component 42@Component
43export default class LdTagInput extends Vue { 43export 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)