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 @@