aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'viewer')
-rw-r--r--viewer/src/components/LdDownload.vue18
1 files changed, 9 insertions, 9 deletions
diff --git a/viewer/src/components/LdDownload.vue b/viewer/src/components/LdDownload.vue
index 3b13e99..f86d455 100644
--- a/viewer/src/components/LdDownload.vue
+++ b/viewer/src/components/LdDownload.vue
@@ -20,10 +20,10 @@
20 20
21<template> 21<template>
22 <div :class="$style.container"> 22 <div :class="$style.container">
23 <a :class="$style.content" :download="itemFileName" :href="itemDownloadUrl"> 23 <a :class="$style.content" :download="itemFileName()" :href="itemDownloadUrl()">
24 <!-- TODO: show thumbnail instead of this generic file download icon? --> 24 <!-- TODO: show thumbnail instead of this generic file download icon? -->
25 <fa-icon :class="$style.icon" icon="file-download" size="6x" /> 25 <fa-icon :class="$style.icon" icon="file-download" size="6x" />
26 <div>{{ $t("download.download-file-fmt", [itemFileName]) }}</div> 26 <div>{{ $t("download.download-file-fmt", [itemFileName()]) }}</div>
27 </a> 27 </a>
28 </div> 28 </div>
29</template> 29</template>
@@ -32,19 +32,19 @@
32import { Component, Prop, Vue } from "vue-property-decorator"; 32import { Component, Prop, Vue } from "vue-property-decorator";
33 33
34@Component export default class LdDownload extends Vue { 34@Component export default class LdDownload extends Vue {
35 @Prop({ required: true }) readonly item!: Gallery.Item; 35 @Prop({ required: true }) readonly item!: Gallery.Other;
36 36
37 get itemResource(): string { 37 itemResource(): string {
38 return (this.item.properties as Gallery.OtherProperties).resource; 38 return this.item.properties.resource;
39 } 39 }
40 40
41 get itemFileName(): string { 41 itemFileName(): string {
42 const timeStamped = this.itemResource.split("/").pop() ?? ""; 42 const timeStamped = this.itemResource().split("/").pop() ?? "";
43 return timeStamped.split("?")[0]; 43 return timeStamped.split("?")[0];
44 } 44 }
45 45
46 get itemDownloadUrl(): string { 46 itemDownloadUrl(): string {
47 return this.$galleryStore.resourceRoot + this.itemResource; 47 return this.$galleryStore.resourceRoot + this.itemResource();
48 } 48 }
49} 49}
50</script> 50</script>