+
-
+
@@ -41,8 +41,6 @@ import { Component, Prop, Vue } from "vue-property-decorator";
--
cgit v1.2.3
From a2e06f0a217b12d92cecdad77c20de88037f9912 Mon Sep 17 00:00:00 2001
From: pacien
Date: Tue, 19 May 2020 21:05:28 +0200
Subject: viewer/navigation: factorise item file name extraction
---
viewer/src/components/LdDownload.vue | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
(limited to 'viewer/src/components')
diff --git a/viewer/src/components/LdDownload.vue b/viewer/src/components/LdDownload.vue
index aea4123..d7dfb7d 100644
--- a/viewer/src/components/LdDownload.vue
+++ b/viewer/src/components/LdDownload.vue
@@ -30,21 +30,17 @@
--
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/components/LdVideoViewer.vue | 50 +++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 viewer/src/components/LdVideoViewer.vue
(limited to 'viewer/src/components')
diff --git a/viewer/src/components/LdVideoViewer.vue b/viewer/src/components/LdVideoViewer.vue
new file mode 100644
index 0000000..49f687f
--- /dev/null
+++ b/viewer/src/components/LdVideoViewer.vue
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
--
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/components/LdAudioViewer.vue | 56 +++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 viewer/src/components/LdAudioViewer.vue
(limited to 'viewer/src/components')
diff --git a/viewer/src/components/LdAudioViewer.vue b/viewer/src/components/LdAudioViewer.vue
new file mode 100644
index 0000000..d115a34
--- /dev/null
+++ b/viewer/src/components/LdAudioViewer.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3
From 69dc0d20706ed41e5ecdbb77515066d8a7d7703b Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 19 Jun 2020 22:12:03 +0200
Subject: viewer: code update (no functional change)
Types { [x: T]: R } updated to Record
Methods in template updated to getters (computed in VueJS), which are reactive and cached
Code formatting
---
viewer/src/components/LdAudioViewer.vue | 16 +++++++++-------
viewer/src/components/LdCommand.vue | 16 ++++++++--------
viewer/src/components/LdDownload.vue | 11 ++++++-----
viewer/src/components/LdGallery.vue | 4 ++--
viewer/src/components/LdPdfViewer.vue | 8 ++++----
viewer/src/components/LdPlainTextViewer.vue | 9 +++++----
viewer/src/components/LdProposition.vue | 2 +-
viewer/src/components/LdThumbnail.vue | 8 ++++----
viewer/src/components/LdVideoViewer.vue | 20 ++++++++++++--------
9 files changed, 51 insertions(+), 43 deletions(-)
(limited to 'viewer/src/components')
diff --git a/viewer/src/components/LdAudioViewer.vue b/viewer/src/components/LdAudioViewer.vue
index d115a34..739d36a 100644
--- a/viewer/src/components/LdAudioViewer.vue
+++ b/viewer/src/components/LdAudioViewer.vue
@@ -21,10 +21,11 @@
@@ -33,14 +34,15 @@
import { Component, Prop, Vue } from "vue-property-decorator";
import Navigation from "@/services/navigation";
-@Component export default class LdAudioViewer extends Vue {
+@Component
+export default class LdAudioViewer extends Vue {
@Prop({ required: true }) readonly audioItem!: Gallery.Audio;
- itemResourceUrl(): string {
+ get itemResourceUrl(): string {
return this.$galleryStore.resourceRoot + this.audioItem.properties.resource;
}
- itemFileName(): string {
+ get itemFileName(): string {
return Navigation.getFileName(this.audioItem);
}
}
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue
index d961519..49d86bb 100644
--- a/viewer/src/components/LdCommand.vue
+++ b/viewer/src/components/LdCommand.vue
@@ -21,17 +21,17 @@
-
+
-
+
@@ -46,19 +46,19 @@ import { RawLocation } from "vue-router";
export default class LdCommand extends Vue {
@Prop({ type: Array, required: true }) readonly currentItemPath!: Gallery.Item[];
- commandToggleSearchPanelIcon(): string {
+ get commandToggleSearchPanelIcon(): string {
return this.$uiStore.fullWidth ? "search" : "angle-double-left";
}
- isRoot(): boolean {
+ get isRoot(): boolean {
return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode;
}
- isEntryPoint(): boolean {
+ get isEntryPoint(): boolean {
return history.state?.ldgallery === "ENTRYPOINT"; // Set by MainLayout.vue
}
- parent(): RawLocation {
+ get parent(): RawLocation {
if (this.$uiStore.searchMode) return this.$route.path;
if (this.currentItemPath.length > 1) return this.currentItemPath[this.currentItemPath.length - 2];
return "";
diff --git a/viewer/src/components/LdDownload.vue b/viewer/src/components/LdDownload.vue
index d7dfb7d..7b09dab 100644
--- a/viewer/src/components/LdDownload.vue
+++ b/viewer/src/components/LdDownload.vue
@@ -20,10 +20,10 @@
@@ -32,14 +32,15 @@
import { Component, Prop, Vue } from "vue-property-decorator";
import Navigation from "@/services/navigation";
-@Component export default class LdDownload extends Vue {
+@Component
+export default class LdDownload extends Vue {
@Prop({ required: true }) readonly item!: Gallery.Other;
- itemFileName(): string {
+ get itemFileName(): string {
return Navigation.getFileName(this.item);
}
- itemDownloadUrl(): string {
+ get itemDownloadUrl(): string {
return this.$galleryStore.resourceRoot + this.item.properties.resource;
}
}
diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue
index e512758..5a72d99 100644
--- a/viewer/src/components/LdGallery.vue
+++ b/viewer/src/components/LdGallery.vue
@@ -18,7 +18,7 @@
-->
-
+
@@ -35,7 +35,7 @@ export default class LdPicture extends Vue {
@Prop({ type: Array, required: true }) readonly items!: Gallery.Item[];
@Prop(String) readonly noresult?: string;
- hasNoResults(): boolean {
+ get hasNoResults(): boolean {
return Boolean(this.noresult) && this.items.length === 0;
}
}
diff --git a/viewer/src/components/LdPdfViewer.vue b/viewer/src/components/LdPdfViewer.vue
index 20055cc..b1f6c64 100644
--- a/viewer/src/components/LdPdfViewer.vue
+++ b/viewer/src/components/LdPdfViewer.vue
@@ -22,7 +22,7 @@