From 09624c0089f0e29ffb1abc578525b6a07fd95e81 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 3 May 2020 23:05:38 +0200 Subject: viewer/GallerySearch: use proper i18n pluralisation --- viewer/src/views/GallerySearch.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue index e75a37e..dfaa5d3 100644 --- a/viewer/src/views/GallerySearch.vue +++ b/viewer/src/views/GallerySearch.vue @@ -29,8 +29,7 @@ import IndexSearch from "@/services/indexsearch"; @Component export default class GalleryPicture extends Vue { @Prop(String) readonly path!: string; - - otherCount: Number = 0; + otherCount: number = 0; mounted() { this.$uiStore.toggleFullscreen(false); @@ -50,8 +49,7 @@ export default class GalleryPicture extends Vue { } noResult() { - const params = [this.otherCount, this.otherCount > 1 ? "s" : ""]; - return this.$t("search.no-results.otherfolders", params); + return this.$tc("search.no-result-fmt", this.otherCount, [this.otherCount]); } } -- cgit v1.2.3 From 665139f7d25a64f66e1149a6403fc26efcbabb2a Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 3 May 2020 23:07:51 +0200 Subject: viewer/GalleryNavigation: better error messages Introducing a generic error page with some icon and a different error for unknown resources GitHub: closes #190 --- viewer/src/views/GalleryNavigation.vue | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index 7c6d11b..08c8218 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -18,18 +18,14 @@ --> -- cgit v1.2.3 From 35456c6183c199b23ded85838414eb28a6d4b60f Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 4 May 2020 00:11:31 +0200 Subject: viewer/LdDownload: add generic file download handler GitHub: closes #209 --- viewer/src/views/GalleryNavigation.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index 08c8218..2e40409 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -65,10 +65,7 @@ export default class GalleryNavigation extends Vue { return { component: "ld-picture", properties: { picture: this.$galleryStore.currentItem } }; default: - return { - component: "ld-error", - properties: { icon: "file", message: this.$t("gallery.unknown-type") } - }; + return { component: "ld-download", properties: { item: this.$galleryStore.currentItem } }; } } } -- cgit v1.2.3 From 34bcf9339c86f145442b9edc799416462bf21fc5 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 8 May 2020 19:28:07 +0200 Subject: viewer/GalleryNavigation: revert to static template component dispatching We'll see for dynamic component loading later. --- viewer/src/views/GalleryNavigation.vue | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index 2e40409..f36fc8a 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -20,12 +20,17 @@ -- cgit v1.2.3 From 8063119d3ee2182a595b2e53ee2bbc557a8a56c3 Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 13 May 2020 00:18:46 +0200 Subject: viewer: add plain text file viewer GitHub: closes #213 --- viewer/src/views/GalleryNavigation.vue | 1 + 1 file changed, 1 insertion(+) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index f36fc8a..b5f06a2 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -24,6 +24,7 @@ + -- cgit v1.2.3 From 226e0beb50061844470bd8a717a74307b975bd96 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 18 May 2020 20:06:22 +0200 Subject: viewer: add pdf viewer Based on native browser rendering. GitHub: closes #211 --- viewer/src/views/GalleryNavigation.vue | 1 + 1 file changed, 1 insertion(+) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index b5f06a2..e1c860b 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -25,6 +25,7 @@ + -- cgit v1.2.3 From bc640b96052d657d22e0afbc05dc1ab4d0289bfb Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 19 May 2020 21:10:37 +0200 Subject: viewer/LdVideoViewer: add video viewer GitHub: closes #222 --- viewer/src/views/GalleryNavigation.vue | 1 + 1 file changed, 1 insertion(+) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index e1c860b..df738b8 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -26,6 +26,7 @@ + -- cgit v1.2.3 From 9adf35eef92ee0842a080a6462ba13d4a17eb5e3 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 19 May 2020 21:11:07 +0200 Subject: viewer/LdAudioViewer: add audio viewer GitHub: closes #158 --- viewer/src/views/GalleryNavigation.vue | 1 + 1 file changed, 1 insertion(+) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index df738b8..9fc40e1 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -27,6 +27,7 @@ + -- cgit v1.2.3 From 74c1c5e34787ac57299c8cbd874e9dcc56da406d Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 22 May 2020 04:14:48 +0200 Subject: viewer: Enumerated item types --- viewer/src/views/GalleryNavigation.vue | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index 9fc40e1..b141d44 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -21,19 +21,26 @@
- - - - - - - + + + + + + +
- - diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index b141d44..843550f 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -18,23 +18,10 @@ --> @@ -42,12 +29,10 @@ import { Component, Vue, Prop, Watch } from "vue-property-decorator"; import { ItemType } from "@/@types/ItemType"; import Navigation from "@/services/navigation"; -import GalleryDirectory from "./GalleryDirectory.vue"; import GallerySearch from "@/views/GallerySearch.vue"; @Component({ components: { - GalleryDirectory, GallerySearch, }, }) @@ -55,13 +40,32 @@ export default class GalleryNavigation extends Vue { @Prop(String) readonly path!: string; @Prop(Array) readonly query!: string[]; - // For the template - readonly ItemType = Object.freeze(ItemType); + readonly COMPONENT_BY_TYPE: Record = { + directory: "ld-directory", + picture: "ld-picture", + plaintext: "ld-plain-text-viewer", + pdf: "ld-pdf-viewer", + video: "ld-video-viewer", + audio: "ld-audio-viewer", + other: "ld-download", + }; mounted() { this.pathChanged(); } + get isError() { + return this.checkType(null); + } + + get isSearch() { + return this.checkType(ItemType.DIRECTORY) && this.query.length > 0; + } + + get componentName() { + return this.COMPONENT_BY_TYPE[this.$galleryStore.currentItem?.properties.type ?? ItemType.OTHER]; + } + @Watch("path") pathChanged() { this.$galleryStore.setCurrentPath(this.path); -- cgit v1.2.3 From 170d7a61f720ece9dc4b347b19f5a8213f1d8984 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 20 Jun 2020 16:50:49 +0200 Subject: viewer: prettier formatting based on eslint-prettier plugin --- viewer/src/views/GalleryNavigation.vue | 3 +-- viewer/src/views/GallerySearch.vue | 3 +-- viewer/src/views/MainLayout.vue | 7 ++----- viewer/src/views/PanelLeft.vue | 4 ++-- viewer/src/views/PanelTop.vue | 8 ++------ 5 files changed, 8 insertions(+), 17 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index 843550f..fd1f19a 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -77,5 +77,4 @@ export default class GalleryNavigation extends Vue { } - + diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue index 4b98cea..fec7216 100644 --- a/viewer/src/views/GallerySearch.vue +++ b/viewer/src/views/GallerySearch.vue @@ -54,5 +54,4 @@ export default class GalleryPicture extends Vue { } - + diff --git a/viewer/src/views/MainLayout.vue b/viewer/src/views/MainLayout.vue index a7af48c..2dd7a57 100644 --- a/viewer/src/views/MainLayout.vue +++ b/viewer/src/views/MainLayout.vue @@ -18,11 +18,8 @@ --> @@ -34,5 +31,4 @@ import { Component, Vue } from "vue-property-decorator"; export default class PanelTop extends Vue {} - + -- cgit v1.2.3 From 7e0e108d1d5d9a86a33322432c3d7e8218961121 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Mon, 11 May 2020 22:42:20 +0200 Subject: viewer: item information (raw implementation) --- viewer/src/views/PanelLeft.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue index 9dc76a0..6341beb 100644 --- a/viewer/src/views/PanelLeft.vue +++ b/viewer/src/views/PanelLeft.vue @@ -26,7 +26,7 @@ />

{{ $t("panelLeft.propositions") }}

-
+
+ +

+ Informations + +

+ +
@@ -49,6 +56,7 @@ import IndexFactory from "@/services/indexfactory"; @Component export default class PanelLeft extends Vue { searchFilters: Tag.Search[] = []; + infoOpen: boolean = true; mounted() { this.restoreSearchFilters(this.$route); @@ -93,6 +101,11 @@ export default class PanelLeft extends Vue { padding: 0.2em 0.5em; margin: 0 0 1px 0; font-variant: small-caps; + justify-content: space-between; + user-select: none; + > svg { + color: $link; + } } } -- cgit v1.2.3 From 4c839e0f30fad9e5df29f1f0682380581c582713 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 20 Aug 2020 00:14:27 +0200 Subject: viewer: information panel with markdown github: resolves #214 github: resolves #37 --- viewer/src/views/PanelLeft.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue index 6341beb..f8d6faf 100644 --- a/viewer/src/views/PanelLeft.vue +++ b/viewer/src/views/PanelLeft.vue @@ -38,9 +38,9 @@ /> -

- Informations - +

+ {{ $t("panelLeft.information.title") }} +

@@ -105,7 +105,8 @@ export default class PanelLeft extends Vue { user-select: none; > svg { color: $link; - } + margin-top: 2px; // Fixes a vertical centering issue with the carret + } } } -- cgit v1.2.3 From 6737bfd38a0568d61c691a507303a65550ae23fc Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 10 Sep 2020 18:44:05 +0200 Subject: viewer: information panel scrollbar and collapse with animation github: resolves #78 --- viewer/src/views/MainLayout.vue | 2 +- viewer/src/views/PanelLeft.vue | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/MainLayout.vue b/viewer/src/views/MainLayout.vue index 2dd7a57..80778f6 100644 --- a/viewer/src/views/MainLayout.vue +++ b/viewer/src/views/MainLayout.vue @@ -106,7 +106,7 @@ html { } .layout { position: fixed; - transition: all 0.1s linear; + transition: all $transition-flex-expand linear; top: 0; bottom: 0; left: 0; diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue index f8d6faf..12c95d1 100644 --- a/viewer/src/views/PanelLeft.vue +++ b/viewer/src/views/PanelLeft.vue @@ -18,7 +18,7 @@ --> @@ -92,11 +92,11 @@ export default class PanelLeft extends Vue { } - -- cgit v1.2.3 From e6c2a8d9653ffde924632ca2f260c3a8cddc14ed Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 11 Sep 2020 00:15:04 +0200 Subject: viewer: item display order github: resolves #28 --- viewer/src/views/MainLayout.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/MainLayout.vue b/viewer/src/views/MainLayout.vue index 80778f6..21c9cb6 100644 --- a/viewer/src/views/MainLayout.vue +++ b/viewer/src/views/MainLayout.vue @@ -20,8 +20,8 @@