diff options
Diffstat (limited to 'viewer/src/components')
17 files changed, 49 insertions, 38 deletions
diff --git a/viewer/src/components/LdBreadcrumb.vue b/viewer/src/components/LdBreadcrumb.vue index 618b15a..2c17554 100644 --- a/viewer/src/components/LdBreadcrumb.vue +++ b/viewer/src/components/LdBreadcrumb.vue | |||
@@ -47,13 +47,14 @@ | |||
47 | </template> | 47 | </template> |
48 | 48 | ||
49 | <script lang="ts"> | 49 | <script lang="ts"> |
50 | import { Component, Vue, Ref, Watch, Prop } from "vue-property-decorator"; | 50 | import { Item } from "@/@types/gallery"; |
51 | import DragScrollClickFix from "@/services/dragscrollclickfix"; | 51 | import DragScrollClickFix from "@/services/dragscrollclickfix"; |
52 | import Navigation from "@/services/navigation"; | 52 | import Navigation from "@/services/navigation"; |
53 | import { Component, Prop, Ref, Vue, Watch } from "vue-property-decorator"; | ||
53 | 54 | ||
54 | @Component | 55 | @Component |
55 | export default class LdBreadcrumb extends Vue { | 56 | export default class LdBreadcrumb extends Vue { |
56 | @Prop({ type: Array, required: true }) readonly currentItemPath!: Gallery.Item[]; | 57 | @Prop({ type: Array, required: true }) readonly currentItemPath!: Item[]; |
57 | @Prop(Boolean) readonly searchMode!: boolean; | 58 | @Prop(Boolean) readonly searchMode!: boolean; |
58 | @Ref() readonly breadcrumb!: HTMLUListElement; | 59 | @Ref() readonly breadcrumb!: HTMLUListElement; |
59 | 60 | ||
@@ -82,7 +83,7 @@ export default class LdBreadcrumb extends Vue { | |||
82 | }); | 83 | }); |
83 | } | 84 | } |
84 | 85 | ||
85 | getIcon(item: Gallery.Item) { | 86 | getIcon(item: Item) { |
86 | return Navigation.getIcon(item); | 87 | return Navigation.getIcon(item); |
87 | } | 88 | } |
88 | } | 89 | } |
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue index 5ba8266..7ffa670 100644 --- a/viewer/src/components/LdCommand.vue +++ b/viewer/src/components/LdCommand.vue | |||
@@ -40,12 +40,13 @@ | |||
40 | </template> | 40 | </template> |
41 | 41 | ||
42 | <script lang="ts"> | 42 | <script lang="ts"> |
43 | import { Component, Vue, Prop } from "vue-property-decorator"; | 43 | import { Item } from "@/@types/gallery"; |
44 | import { Component, Prop, Vue } from "vue-property-decorator"; | ||
44 | import { RawLocation } from "vue-router"; | 45 | import { RawLocation } from "vue-router"; |
45 | 46 | ||
46 | @Component | 47 | @Component |
47 | export default class LdCommand extends Vue { | 48 | export default class LdCommand extends Vue { |
48 | @Prop({ type: Array, required: true }) readonly currentItemPath!: Gallery.Item[]; | 49 | @Prop({ type: Array, required: true }) readonly currentItemPath!: Item[]; |
49 | 50 | ||
50 | get commandToggleSearchPanelIcon(): string { | 51 | get commandToggleSearchPanelIcon(): string { |
51 | return this.$uiStore.fullWidth ? "search" : "angle-double-left"; | 52 | return this.$uiStore.fullWidth ? "search" : "angle-double-left"; |
diff --git a/viewer/src/components/LdCommandSort.vue b/viewer/src/components/LdCommandSort.vue index 4c246e6..c8a822e 100644 --- a/viewer/src/components/LdCommandSort.vue +++ b/viewer/src/components/LdCommandSort.vue | |||
@@ -32,8 +32,8 @@ | |||
32 | </template> | 32 | </template> |
33 | 33 | ||
34 | <script lang="ts"> | 34 | <script lang="ts"> |
35 | import { Component, Vue, Prop } from "vue-property-decorator"; | ||
36 | import ItemComparators, { ItemSort } from "@/services/itemComparators"; | 35 | import ItemComparators, { ItemSort } from "@/services/itemComparators"; |
36 | import { Component, Vue } from "vue-property-decorator"; | ||
37 | 37 | ||
38 | @Component | 38 | @Component |
39 | export default class LdCommandSort extends Vue { | 39 | export default class LdCommandSort extends Vue { |
diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue index edd479c..1443927 100644 --- a/viewer/src/components/LdGallery.vue +++ b/viewer/src/components/LdGallery.vue | |||
@@ -27,12 +27,12 @@ | |||
27 | </template> | 27 | </template> |
28 | 28 | ||
29 | <script lang="ts"> | 29 | <script lang="ts"> |
30 | import { Component, Vue, Prop, Model } from "vue-property-decorator"; | 30 | import { Item } from "@/@types/gallery"; |
31 | import DragScrollClickFix from "@/services/dragscrollclickfix"; | 31 | import { Component, Prop, Vue } from "vue-property-decorator"; |
32 | 32 | ||
33 | @Component | 33 | @Component |
34 | export default class LdPicture extends Vue { | 34 | export default class LdPicture extends Vue { |
35 | @Prop({ type: Array, required: true }) readonly items!: Gallery.Item[]; | 35 | @Prop({ type: Array, required: true }) readonly items!: Item[]; |
36 | @Prop(String) readonly noresult?: string; | 36 | @Prop(String) readonly noresult?: string; |
37 | 37 | ||
38 | get sortedItems() { | 38 | get sortedItems() { |
diff --git a/viewer/src/components/LdInformation.vue b/viewer/src/components/LdInformation.vue index 66ccc80..b161485 100644 --- a/viewer/src/components/LdInformation.vue +++ b/viewer/src/components/LdInformation.vue | |||
@@ -26,12 +26,13 @@ | |||
26 | </template> | 26 | </template> |
27 | 27 | ||
28 | <script lang="ts"> | 28 | <script lang="ts"> |
29 | import { Component, Vue, Prop } from "vue-property-decorator"; | 29 | import { Item } from "@/@types/gallery"; |
30 | import marked from "marked"; | 30 | import marked from "marked"; |
31 | import { Component, Prop, Vue } from "vue-property-decorator"; | ||
31 | 32 | ||
32 | @Component | 33 | @Component |
33 | export default class LdInformation extends Vue { | 34 | export default class LdInformation extends Vue { |
34 | @Prop({ required: true }) readonly item!: Gallery.Item; | 35 | @Prop({ required: true }) readonly item!: Item; |
35 | 36 | ||
36 | get formatDate() { | 37 | get formatDate() { |
37 | const date = this.item.datetime.substr(0, 10); | 38 | const date = this.item.datetime.substr(0, 10); |
diff --git a/viewer/src/components/LdKeyPress.vue b/viewer/src/components/LdKeyPress.vue index c507b33..151d6c6 100644 --- a/viewer/src/components/LdKeyPress.vue +++ b/viewer/src/components/LdKeyPress.vue | |||
@@ -18,7 +18,7 @@ | |||
18 | --> | 18 | --> |
19 | 19 | ||
20 | <script lang="ts"> | 20 | <script lang="ts"> |
21 | import { Component, Vue, Prop, Emit } from "vue-property-decorator"; | 21 | import { Component, Emit, Prop, Vue } from "vue-property-decorator"; |
22 | 22 | ||
23 | @Component | 23 | @Component |
24 | export default class LdKeyPress extends Vue { | 24 | export default class LdKeyPress extends 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 @@ | |||
54 | </template> | 54 | </template> |
55 | 55 | ||
56 | <script lang="ts"> | 56 | <script lang="ts"> |
57 | import { Component, Vue, Prop, PropSync, Watch } from "vue-property-decorator"; | 57 | import { Item, RawTag } from "@/@types/gallery"; |
58 | import { Operation } from "@/@types/Operation"; | 58 | import { Operation } from "@/@types/Operation"; |
59 | import { Component, Prop, PropSync, Vue, Watch } from "vue-property-decorator"; | ||
59 | 60 | ||
60 | @Component | 61 | @Component |
61 | export default class LdProposition extends Vue { | 62 | export default class LdProposition extends Vue { |
@@ -118,16 +119,16 @@ export default class LdProposition extends Vue { | |||
118 | return this.category?.tag ?? this.$t("panelLeft.propositions.other"); | 119 | return this.category?.tag ?? this.$t("panelLeft.propositions.other"); |
119 | } | 120 | } |
120 | 121 | ||
121 | extractDistinctItems(currentTags: Tag.Search[]): Gallery.Item[] { | 122 | extractDistinctItems(currentTags: Tag.Search[]): Item[] { |
122 | return [...new Set(currentTags.flatMap(tag => tag.items))]; | 123 | return [...new Set(currentTags.flatMap(tag => tag.items))]; |
123 | } | 124 | } |
124 | 125 | ||
125 | rightmost(tag: Gallery.RawTag): Gallery.RawTag { | 126 | rightmost(tag: RawTag): RawTag { |
126 | const dot = tag.lastIndexOf(":"); | 127 | const dot = tag.lastIndexOf(":"); |
127 | return dot <= 0 ? tag : tag.substr(dot + 1); | 128 | return dot <= 0 ? tag : tag.substr(dot + 1); |
128 | } | 129 | } |
129 | 130 | ||
130 | add(operation: Operation, rawTag: Gallery.RawTag) { | 131 | add(operation: Operation, rawTag: RawTag) { |
131 | const node = this.tagsIndex[rawTag]; | 132 | const node = this.tagsIndex[rawTag]; |
132 | const display = this.category ? `${operation}${this.category.tag}:${node.tag}` : `${operation}${node.tag}`; | 133 | const display = this.category ? `${operation}${this.category.tag}:${node.tag}` : `${operation}${node.tag}`; |
133 | this.model.push({ ...node, parent: this.category, operation, display }); | 134 | this.model.push({ ...node, parent: this.category, operation, display }); |
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue index ce83ba8..ef585f0 100644 --- a/viewer/src/components/LdTagInput.vue +++ b/viewer/src/components/LdTagInput.vue | |||
@@ -40,10 +40,8 @@ | |||
40 | </template> | 40 | </template> |
41 | 41 | ||
42 | <script lang="ts"> | 42 | <script lang="ts"> |
43 | import { Component, Vue, Prop, PropSync, Emit } from "vue-property-decorator"; | ||
44 | import { Operation } from "@/@types/Operation"; | ||
45 | import Navigation from "@/services/navigation"; | ||
46 | import IndexFactory from "@/services/indexfactory"; | 43 | import IndexFactory from "@/services/indexfactory"; |
44 | import { Component, Emit, Prop, PropSync, Vue } from "vue-property-decorator"; | ||
47 | 45 | ||
48 | @Component | 46 | @Component |
49 | export default class LdTagInput extends Vue { | 47 | export default class LdTagInput extends Vue { |
diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue index 5b1bc82..3f67a43 100644 --- a/viewer/src/components/LdThumbnail.vue +++ b/viewer/src/components/LdThumbnail.vue | |||
@@ -37,12 +37,13 @@ | |||
37 | </template> | 37 | </template> |
38 | 38 | ||
39 | <script lang="ts"> | 39 | <script lang="ts"> |
40 | import { C |