aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdProposition.vue
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/components/LdProposition.vue')
-rw-r--r--viewer/src/components/LdProposition.vue13
1 files changed, 9 insertions, 4 deletions
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
index e19e01a..34ddf51 100644
--- a/viewer/src/components/LdProposition.vue
+++ b/viewer/src/components/LdProposition.vue
@@ -47,8 +47,8 @@
47 47
48 <div class="disabled" :title="$t('tag-propositions.item-count')">{{ proposed.count }}</div> 48 <div class="disabled" :title="$t('tag-propositions.item-count')">{{ proposed.count }}</div>
49 </div> 49 </div>
50 <div v-if="showMore > 0" class="showmore" @click="limit += showMore"> 50 <div v-if="showMoreCount > 0" class="showmore" @click="limit += showMoreCount">
51 {{ $t("tag-propositions.showmore", [showMore]) }}<fa-icon icon="angle-double-down" /> 51 {{ $t("tag-propositions.showmore", [showMoreCount]) }}<fa-icon icon="angle-double-down" />
52 </div> 52 </div>
53 </div> 53 </div>
54</template> 54</template>
@@ -65,10 +65,15 @@ export default class LdProposition extends Vue {
65 @Prop({ required: true }) readonly tagsIndex!: Tag.Index; 65 @Prop({ required: true }) readonly tagsIndex!: Tag.Index;
66 @PropSync("searchFilters", { type: Array, required: true }) model!: Tag.Search[]; 66 @PropSync("searchFilters", { type: Array, required: true }) model!: Tag.Search[];
67 67
68 readonly INITIAL_TAG_DISPLAY_LIMIT = this.$galleryStore.config?.initialTagDisplayLimit ?? 10; 68 readonly INITIAL_TAG_DISPLAY_LIMIT = this.getInitialTagDisplayLimit();
69 69
70 limit: number = this.INITIAL_TAG_DISPLAY_LIMIT; 70 limit: number = this.INITIAL_TAG_DISPLAY_LIMIT;
71 71
72 getInitialTagDisplayLimit() {
73 const limit = this.$galleryStore.config?.initialTagDisplayLimit ?? 10;
74 return limit > 0 ? limit : 1000;
75 }
76
72 @Watch("$route") 77 @Watch("$route")
73 onRouteChange() { 78 onRouteChange() {
74 this.limit = this.INITIAL_TAG_DISPLAY_LIMIT; 79 this.limit = this.INITIAL_TAG_DISPLAY_LIMIT;
@@ -105,7 +110,7 @@ export default class LdProposition extends Vue {
105 .map(entry => ({ rawTag: entry[0], count: entry[1] })); 110 .map(entry => ({ rawTag: entry[0], count: entry[1] }));
106 } 111 }
107 112
108 get showMore(): number { 113 get showMoreCount(): number {
109 return Object.keys(this.propositions).length - Object.keys(this.proposedTags).length; 114 return Object.keys(this.propositions).length - Object.keys(this.proposedTags).length;
110 } 115 }
111 116