aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdProposition.vue
diff options
context:
space:
mode:
authorZero~Informatique2021-07-02 22:59:56 +0200
committerZero~Informatique2021-07-03 00:05:22 +0200
commit92cb34b719b481faf417760f307241e8f6d777a9 (patch)
treeba33af35b8bb07e6c1c19b84f6c3af37c791584c /viewer/src/components/LdProposition.vue
parent9165cc1efcf7791f78b61b2c51a9de651b1b09aa (diff)
downloadldgallery-92cb34b719b481faf417760f307241e8f6d777a9.tar.gz
viewer: types normalization - tag.d.ts
GitHub: closes #301
Diffstat (limited to 'viewer/src/components/LdProposition.vue')
-rw-r--r--viewer/src/components/LdProposition.vue9
1 files changed, 5 insertions, 4 deletions
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
index 2396d1f..088e249 100644
--- a/viewer/src/components/LdProposition.vue
+++ b/viewer/src/components/LdProposition.vue
@@ -56,15 +56,16 @@
56<script lang="ts"> 56<script lang="ts">
57import { Item, RawTag } from "@/@types/gallery"; 57import { Item, RawTag } from "@/@types/gallery";
58import { Operation } from "@/@types/Operation"; 58import { Operation } from "@/@types/Operation";
59import { TagIndex, TagNode, TagSearch } from "@/@types/tag";
59import { Component, Prop, PropSync, Vue, Watch } from "vue-property-decorator"; 60import { Component, Prop, PropSync, Vue, Watch } from "vue-property-decorator";
60 61
61@Component 62@Component
62export default class LdProposition extends Vue { 63export default class LdProposition extends Vue {
63 @Prop() readonly category?: Tag.Node; 64 @Prop() readonly category?: TagNode;
64 @Prop({ type: Boolean, required: true }) readonly showCategory!: boolean; 65 @Prop({ type: Boolean, required: true }) readonly showCategory!: boolean;
65 @Prop({ type: Array, required: true }) readonly currentTags!: string[]; 66 @Prop({ type: Array, required: true }) readonly currentTags!: string[];
66 @Prop({ required: true }) readonly tagsIndex!: Tag.Index; 67 @Prop({ required: true }) readonly tagsIndex!: TagIndex;
67 @PropSync("searchFilters", { type: Array, required: true }) model!: Tag.Search[]; 68 @PropSync("searchFilters", { type: Array, required: true }) model!: TagSearch[];
68 69
69 readonly INITIAL_TAG_DISPLAY_LIMIT = this.getInitialTagDisplayLimit(); 70 readonly INITIAL_TAG_DISPLAY_LIMIT = this.getInitialTagDisplayLimit();
70 71
@@ -119,7 +120,7 @@ export default class LdProposition extends Vue {
119 return this.category?.tag ?? this.$t("panelLeft.propositions.other"); 120 return this.category?.tag ?? this.$t("panelLeft.propositions.other");
120 } 121 }
121 122
122 extractDistinctItems(currentTags: Tag.Search[]): Item[] { 123 extractDistinctItems(currentTags: TagSearch[]): Item[] {
123 return [...new Set(currentTags.flatMap(tag => tag.items))]; 124 return [...new Set(currentTags.flatMap(tag => tag.items))];
124 } 125 }
125 126