diff options
Diffstat (limited to 'viewer/src/components/LdAudioViewer.vue')
-rw-r--r-- | viewer/src/components/LdAudioViewer.vue | 16 |
1 files changed, 9 insertions, 7 deletions
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 @@ | |||
21 | <template> | 21 | <template> |
22 | <div class="flex-column container-vh-centering"> | 22 | <div class="flex-column container-vh-centering"> |
23 | <ld-thumbnail :item="audioItem" /> | 23 | <ld-thumbnail :item="audioItem" /> |
24 | <audio :class="$style.player" :src="itemResourceUrl()" preload="auto" controls> | 24 | <audio :class="$style.player" :src="itemResourceUrl" preload="auto" controls> |
25 | <a :download="itemFileName()" :href="itemResourceUrl()"> | 25 | <a |
26 | {{ $t("download.download-file-fmt", [itemFileName()]) }} | 26 | :download="itemFileName" |
27 | </a> | 27 | :href="itemResourceUrl" |
28 | >{{ $t("download.download-file-fmt", [itemFileName]) }}</a> | ||
28 | </audio> | 29 | </audio> |
29 | </div> | 30 | </div> |
30 | </template> | 31 | </template> |
@@ -33,14 +34,15 @@ | |||
33 | import { Component, Prop, Vue } from "vue-property-decorator"; | 34 | import { Component, Prop, Vue } from "vue-property-decorator"; |
34 | import Navigation from "@/services/navigation"; | 35 | import Navigation from "@/services/navigation"; |
35 | 36 | ||
36 | @Component export default class LdAudioViewer extends Vue { | 37 | @Component |
38 | export default class LdAudioViewer extends Vue { | ||
37 | @Prop({ required: true }) readonly audioItem!: Gallery.Audio; | 39 | @Prop({ required: true }) readonly audioItem!: Gallery.Audio; |
38 | 40 | ||
39 | itemResourceUrl(): string { | 41 | get itemResourceUrl(): string { |
40 | return this.$galleryStore.resourceRoot + this.audioItem.properties.resource; | 42 | return this.$galleryStore.resourceRoot + this.audioItem.properties.resource; |
41 | } | 43 | } |
42 | 44 | ||
43 | itemFileName(): string { | 45 | get itemFileName(): string { |
44 | return Navigation.getFileName(this.audioItem); | 46 | return Navigation.getFileName(this.audioItem); |
45 | } | 47 | } |
46 | } | 48 | } |