From 9165cc1efcf7791f78b61b2c51a9de651b1b09aa Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 2 Jul 2021 22:53:16 +0200
Subject: viewer: types normalization - gallery.d.ts

GitHub: closes #301
---
 viewer/src/components/LdProposition.vue | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'viewer/src/components/LdProposition.vue')

diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
index aa44943..2396d1f 100644
--- a/viewer/src/components/LdProposition.vue
+++ b/viewer/src/components/LdProposition.vue
@@ -54,8 +54,9 @@
 </template>
 
 <script lang="ts">
-import { Component, Vue, Prop, PropSync, Watch } from "vue-property-decorator";
+import { Item, RawTag } from "@/@types/gallery";
 import { Operation } from "@/@types/Operation";
+import { Component, Prop, PropSync, Vue, Watch } from "vue-property-decorator";
 
 @Component
 export default class LdProposition extends Vue {
@@ -118,16 +119,16 @@ export default class LdProposition extends Vue {
     return this.category?.tag ?? this.$t("panelLeft.propositions.other");
   }
 
-  extractDistinctItems(currentTags: Tag.Search[]): Gallery.Item[] {
+  extractDistinctItems(currentTags: Tag.Search[]): Item[] {
     return [...new Set(currentTags.flatMap(tag => tag.items))];
   }
 
-  rightmost(tag: Gallery.RawTag): Gallery.RawTag {
+  rightmost(tag: RawTag): RawTag {
     const dot = tag.lastIndexOf(":");
     return dot <= 0 ? tag : tag.substr(dot + 1);
   }
 
-  add(operation: Operation, rawTag: Gallery.RawTag) {
+  add(operation: Operation, rawTag: RawTag) {
     const node = this.tagsIndex[rawTag];
     const display = this.category ? `${operation}${this.category.tag}:${node.tag}` : `${operation}${node.tag}`;
     this.model.push({ ...node, parent: this.category, operation, display });
-- 
cgit v1.2.3

