aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/components')
-rw-r--r--viewer/src/components/LdBreadcrumb.vue7
-rw-r--r--viewer/src/components/LdCommand.vue5
-rw-r--r--viewer/src/components/LdCommandSort.vue2
-rw-r--r--viewer/src/components/LdGallery.vue6
-rw-r--r--viewer/src/components/LdInformation.vue5
-rw-r--r--viewer/src/components/LdKeyPress.vue2
-rw-r--r--viewer/src/components/LdProposition.vue16
-rw-r--r--viewer/src/components/LdTagInput.vue15
-rw-r--r--viewer/src/components/LdThumbnail.vue5
-rw-r--r--viewer/src/components/LdTitle.vue5
-rw-r--r--viewer/src/components/item_handlers/LdAudioViewer.vue5
-rw-r--r--viewer/src/components/item_handlers/LdDirectoryViewer.vue (renamed from viewer/src/components/item_handlers/LdDirectory.vue)7
-rw-r--r--viewer/src/components/item_handlers/LdDownloadViewer.vue (renamed from viewer/src/components/item_handlers/LdDownload.vue)7
-rw-r--r--viewer/src/components/item_handlers/LdPdfViewer.vue3
-rw-r--r--viewer/src/components/item_handlers/LdPictureViewer.vue (renamed from viewer/src/components/item_handlers/LdPicture.vue)9
-rw-r--r--viewer/src/components/item_handlers/LdPlainTextViewer.vue3
-rw-r--r--viewer/src/components/item_handlers/LdVideoViewer.vue3
17 files changed, 59 insertions, 46 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">
50import { Component, Vue, Ref, Watch, Prop } from "vue-property-decorator"; 50import { Item } from "@/@types/gallery";
51import DragScrollClickFix from "@/services/dragscrollclickfix"; 51import DragScrollClickFix from "@/services/dragscrollclickfix";
52import Navigation from "@/services/navigation"; 52import Navigation from "@/services/navigation";
53import { Component, Prop, Ref, Vue, Watch } from "vue-property-decorator";
53 54
54@Component 55@Component
55export default class LdBreadcrumb extends Vue { 56export 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">
43import { Component, Vue, Prop } from "vue-property-decorator"; 43import { Item } from "@/@types/gallery";
44import { Component, Prop, Vue } from "vue-property-decorator";
44import { RawLocation } from "vue-router"; 45import { RawLocation } from "vue-router";
45 46
46@Component 47@Component
47export default class LdCommand extends Vue { 48export 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">
35import { Component, Vue, Prop } from "vue-property-decorator";
36import ItemComparators, { ItemSort } from "@/services/itemComparators"; 35import ItemComparators, { ItemSort } from "@/services/itemComparators";
36import { Component, Vue } from "vue-property-decorator";
37 37
38@Component 38@Component
39export default class LdCommandSort extends Vue { 39export 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">
30import { Component, Vue, Prop, Model } from "vue-property-decorator"; 30import { Item } from "@/@types/gallery";
31import DragScrollClickFix from "@/services/dragscrollclickfix"; 31import { Component, Prop, Vue } from "vue-property-decorator";
32 32
33@Component 33@Component
34export default class LdPicture extends Vue { 34export 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">
29import { Component, Vue, Prop } from "vue-property-decorator"; 29import { Item } from "@/@types/gallery";
30import marked from "marked"; 30import marked from "marked";
31import { Component, Prop, Vue } from "vue-property-decorator";
31 32
32@Component 33@Component
33export default class LdInformation extends Vue { 34export 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">
21import { Component, Vue, Prop, Emit } from "vue-property-decorator"; 21import { Component, Emit, Prop, Vue } from "vue-property-decorator";
22 22
23@Component 23@Component
24export default class LdKeyPress extends Vue { 24export default class LdKeyPress extends Vue {
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
index aa44943..088e249 100644
--- a/viewer/src/components/LdProposition.vue
+++ b/viewer/src/components/LdProposition.vue
@@ -54,16 +54,18 @@
54</template> 54</template>
55 55
56<script lang="ts"> 56<script lang="ts">
57import { Component, Vue, Prop, PropSync, Watch } from "vue-property-decorator"; 57import { Item, RawTag } from "@/@types/gallery";
58import { Operation } from "@/@types/Operation"; 58import { Operation } from "@/@types/Operation";
59import { TagIndex, TagNode, TagSearch } from "@/@types/tag";
60import { Component, Prop, PropSync, Vue, Watch } from "vue-property-decorator";
59 61
60@Component 62@Component
61export default class LdProposition extends Vue { 63export default class LdProposition extends Vue {
62 @Prop() readonly category?: Tag.Node; 64 @Prop() readonly category?: TagNode;
63 @Prop({ type: Boolean, required: true }) readonly showCategory!: boolean; 65 @Prop({ type: Boolean, required: true }) readonly showCategory!: boolean;
64 @Prop({ type: Array, required: true }) readonly currentTags!: string[]; 66 @Prop({ type: Array, required: true }) readonly currentTags!: string[];
65 @Prop({ required: true }) readonly tagsIndex!: Tag.Index; 67 @Prop({ required: true }) readonly tagsIndex!: TagIndex;
66 @PropSync("searchFilters", { type: Array, required: true }) model!: Tag.Search[]; 68 @PropSync("searchFilters", { type: Array, required: true }) model!: TagSearch[];
67 69
68 readonly INITIAL_TAG_DISPLAY_LIMIT = this.getInitialTagDisplayLimit(); 70 readonly INITIAL_TAG_DISPLAY_LIMIT = this.getInitialTagDisplayLimit();
69 71
@@ -118,16 +120,16 @@ export default class LdProposition extends Vue {
118 return this.category?.tag ?? this.$t("panelLeft.propositions.other"); 120 return this.category?.tag ?? this.$t("panelLeft.propositions.other");
119 } 121 }
120 122
121 extractDistinctItems(currentTags: Tag.Search[]): Gallery.Item[] { 123 extractDistinctItems(currentTags: TagSearch[]): Item[] {
122 return [...new Set(currentTags.flatMap(tag => tag.items))]; 124 return [...new Set(currentTags.flatMap(tag => tag.items))];
123 } 125 }
124 126
125 rightmost(tag: Gallery.RawTag): Gallery.RawTag { 127 rightmost(tag: RawTag): RawTag {
126 const dot = tag.lastIndexOf(":"); 128 const dot = tag.lastIndexOf(":");
127 return dot <= 0 ? tag : tag.substr(dot + 1); 129 return dot <= 0 ? tag : tag.substr(dot + 1);
128 } 130 }
129 131
130 add(operation: Operation, rawTag: Gallery.RawTag) { 132 add(operation: Operation, rawTag: RawTag) {
131 const node = this.tagsIndex[rawTag]; 133 const node = this.tagsIndex[rawTag];
132 const display = this.category ? `${operation}${this.category.tag}:${node.tag}` : `${operation}${node.tag}`; 134 const display = this.category ? `${operation}${this.category.tag}:${node.tag}` : `${operation}${node.tag}`;
133 this.model.push({ ...node, parent: this.category, operation, display }); 135 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..855813a 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -40,24 +40,23 @@
40</template>