aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/components')
-rw-r--r--viewer/src/components/LdBreadcrumb.vue22
-rw-r--r--viewer/src/components/LdCommand.vue23
-rw-r--r--viewer/src/components/LdCommandSearch.vue6
-rw-r--r--viewer/src/components/LdCommandSort.vue11
-rw-r--r--viewer/src/components/LdGallery.vue12
-rw-r--r--viewer/src/components/LdInformation.vue20
-rw-r--r--viewer/src/components/LdKeyPress.vue2
-rw-r--r--viewer/src/components/LdProposition.vue39
-rw-r--r--viewer/src/components/LdTagInput.vue21
-rw-r--r--viewer/src/components/LdThumbnail.vue13
-rw-r--r--viewer/src/components/LdTitle.vue5
-rw-r--r--viewer/src/components/async/Markdown.vue123
-rw-r--r--viewer/src/components/async/index.ts4
-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)9
-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.vue7
-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.vue7
20 files changed, 246 insertions, 102 deletions
diff --git a/viewer/src/components/LdBreadcrumb.vue b/viewer/src/components/LdBreadcrumb.vue
index 618b15a..d518365 100644
--- a/viewer/src/components/LdBreadcrumb.vue
+++ b/viewer/src/components/LdBreadcrumb.vue
@@ -21,14 +21,15 @@
21 <div 21 <div
22 ref="breadcrumb" 22 ref="breadcrumb"
23 v-dragscroll 23 v-dragscroll
24 class="ld-breadcrumb flex scrollbar" 24 class="flex scrollbar"
25 :class="$style.ldBreadcrumb"
25 @click.capture="e => dragScrollClickFix.onClickCapture(e)" 26 @click.capture="e => dragScrollClickFix.onClickCapture(e)"
26 @dragscrollstart="dragScrollClickFix.onDragScrollStart()" 27 @dragscrollstart="dragScrollClickFix.onDragScrollStart()"
27 @dragscrollend="dragScrollClickFix.onDragScrollEnd()" 28 @dragscrollend="dragScrollClickFix.onDragScrollEnd()"
28 @dragscrollmove="checkForOverflowMask" 29 @dragscrollmove="checkForOverflowMask"
29 > 30 >
30 <div v-show="overflowMask" class="ld-breadcrumb-overflow-mask"></div> 31 <div v-show="overflowMask" :class="$style.ldBreadcrumbOverflowMask"></div>
31 <ul class="ld-breadcrumb"> 32 <ul>
32 <li v-for="(item, idx) in currentItemPath" :key="item.path"> 33 <li v-for="(item, idx) in currentItemPath" :key="item.path">
33 <fa-icon v-if="idx > 0" icon="angle-right" class="disabled" /> 34 <fa-icon v-if="idx > 0" icon="angle-right" class="disabled" />
34 <router-link :to="item.path" class="link"> 35 <router-link :to="item.path" class="link">
@@ -47,13 +48,14 @@
47</template> 48</template>
48 49
49<script lang="ts"> 50<script lang="ts">
50import { Component, Vue, Ref, Watch, Prop } from "vue-property-decorator"; 51import { Item } from "@/@types/gallery";
51import DragScrollClickFix from "@/services/dragscrollclickfix"; 52import DragScrollClickFix from "@/services/dragscrollclickfix";
52import Navigation from "@/services/navigation"; 53import Navigation from "@/services/navigation";
54import { Component, Prop, Ref, Vue, Watch } from "vue-property-decorator";
53 55
54@Component 56@Component
55export default class LdBreadcrumb extends Vue { 57export default class LdBreadcrumb extends Vue {
56 @Prop({ type: Array, required: true }) readonly currentItemPath!: Gallery.Item[]; 58 @Prop({ type: Array, required: true }) readonly currentItemPath!: Item[];
57 @Prop(Boolean) readonly searchMode!: boolean; 59 @Prop(Boolean) readonly searchMode!: boolean;
58 @Ref() readonly breadcrumb!: HTMLUListElement; 60 @Ref() readonly breadcrumb!: HTMLUListElement;
59 61
@@ -82,16 +84,16 @@ export default class LdBreadcrumb extends Vue {
82 }); 84 });
83 } 85 }
84 86
85 getIcon(item: Gallery.Item) { 87 getIcon(item: Item) {
86 return Navigation.getIcon(item); 88 return Navigation.getIcon(item);
87 } 89 }
88} 90}
89</script> 91</script>
90 92
91<style lang="scss"> 93<style lang="scss" module>
92@import "~@/assets/scss/theme.scss"; 94@import "~@/assets/scss/theme.scss";
93 95
94.ld-breadcrumb-overflow-mask { 96.ldBreadcrumbOverflowMask {
95 position: absolute; 97 position: absolute;
96 width: 100%; 98 width: 100%;
97 height: 100%; 99 height: 100%;
@@ -103,7 +105,7 @@ export default class LdBreadcrumb extends Vue {
103 pointer-events: none; 105 pointer-events: none;
104} 106}
105 107
106.ld-breadcrumb { 108.ldBreadcrumb {
107 ul { 109 ul {
108 display: flex; 110 display: flex;
109 white-space: nowrap; 111 white-space: nowrap;
@@ -116,7 +118,7 @@ export default class LdBreadcrumb extends Vue {
116 align-self: center; 118 align-self: center;
117 margin-right: $breadcrumb-margins; 119 margin-right: $breadcrumb-margins;
118 } 120 }
119 &.scrollbar { 121 &:global(.scrollbar) {
120 overflow-y: hidden; 122 overflow-y: hidden;
121 scrollbar-width: none; 123 scrollbar-width: none;
122 &::-webkit-scrollbar { 124 &::-webkit-scrollbar {
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue
index 6059162..19174ad 100644
--- a/viewer/src/components/LdCommand.vue
+++ b/viewer/src/components/LdCommand.vue
@@ -19,16 +19,16 @@
19--> 19-->
20 20
21<template> 21<template>
22 <div class="flex command-btns"> 22 <div class="flex" :class="$style.commandBtns">
23 <a class="link" :title="$t('command.search')" @click="$uiStore.toggleFullWidth()"> 23 <a class="link" :title="$t('command.search')" @click="$uiStore.toggleFullWidth()">
24 <fa-icon :icon="commandToggleSearchPanelIcon" size="lg" /> 24 <fa-icon :icon="commandToggleSearchPanelIcon" size="lg" />
25 </a> 25 </a>
26 <ld-command-sort /> 26 <ld-command-sort />
27 <a 27 <a
28 :class="{ disabled: isEntryPoint }" 28 class="link"
29 class="link command-secondary" 29 :class="{ disabled: isEntryPoint(), [$style.commandSecondary]: true }"
30 :title="$t('command.back')" 30 :title="$t('command.back')"
31 @click="isEntryPoint || $router.back()" 31 @click="isEntryPoint() || $router.back()"
32 > 32 >
33 <fa-icon icon="arrow-left" size="lg" /> 33 <fa-icon icon="arrow-left" size="lg" />
34 </a> 34 </a>
@@ -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";
@@ -55,7 +56,7 @@ export default class LdCommand extends Vue {
55 return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode; 56 return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode;
56 } 57 }
57 58
58 get isEntryPoint(): boolean { 59 isEntryPoint(): boolean {
59 return history.state?.ldgallery === "ENTRYPOINT"; // Set by MainLayout.vue 60 return history.state?.ldgallery === "ENTRYPOINT"; // Set by MainLayout.vue
60 } 61 }
61 62
@@ -67,18 +68,18 @@ export default class LdCommand extends Vue {
67} 68}
68</script> 69</script>
69 70
70<style lang="scss"> 71<style lang="scss" module>
71@import "~@/assets/scss/_buefy_variables.scss"; 72@import "~@/assets/scss/_buefy_variables.scss";
72@import "~@/assets/scss/theme.scss"; 73@import "~@/assets/scss/theme.scss";
73 74
74.command-btns { 75.commandBtns {
75 background-color: $command-buttons-bgcolor; 76 background-color: $command-buttons-bgcolor;
76 justify-content: space-around; 77 justify-content: space-around;
77 vertical-align: middle; 78 vertical-align: middle;
78 align-items: center; 79 align-items: center;
79 flex: 0 0 $layout-left; 80 flex: 0 0 $layout-left;
80 81
81 > a { 82 > * {
82 // normalise icon active boxes 83 // normalise icon active boxes
83 width: $layout-top; 84 width: $layout-top;
84 line-height: $layout-top; 85 line-height: $layout-top;
@@ -89,7 +90,7 @@ export default class LdCommand extends Vue {
89 @media only screen and (max-width: $tablet) { 90 @media only screen and (max-width: $tablet) {
90 flex: 0 1; 91 flex: 0 1;
91 92
92 > .command-secondary { 93 > .commandSecondary {
93 display: none; 94 display: none;
94 }