diff options
Diffstat (limited to 'viewer/src/views/GalleryThumbnail.vue')
-rw-r--r-- | viewer/src/views/GalleryThumbnail.vue | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/viewer/src/views/GalleryThumbnail.vue b/viewer/src/views/GalleryThumbnail.vue index 2ed0bc2..2a372cd 100644 --- a/viewer/src/views/GalleryThumbnail.vue +++ b/viewer/src/views/GalleryThumbnail.vue | |||
@@ -22,13 +22,13 @@ | |||
22 | <v-lazy-image | 22 | <v-lazy-image |
23 | v-if="item.thumbnail" | 23 | v-if="item.thumbnail" |
24 | class="thumbnail" | 24 | class="thumbnail" |
25 | :src="pictureSrc" | 25 | :src="pictureSrc()" |
26 | :title="item.path" | 26 | :title="item.path" |
27 | @intersect="loading=true" | 27 | @intersect="loading=true" |
28 | @load="loading=false" | 28 | @load="loading=false" |
29 | /> | 29 | /> |
30 | <div v-else class="flex-column flex-center"> | 30 | <div v-else class="flex-column flex-center"> |
31 | <fa-icon icon="folder" size="4x" /> | 31 | <fa-icon :icon="getIcon()" size="4x" /> |
32 | {{item.title}} | 32 | {{item.title}} |
33 | </div> | 33 | </div> |
34 | </div> | 34 | </div> |
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | <script lang="ts"> | 37 | <script lang="ts"> |
38 | import { Component, Vue, Prop } from "vue-property-decorator"; | 38 | import { Component, Vue, Prop } from "vue-property-decorator"; |
39 | import Tools from "@/tools"; | ||
39 | 40 | ||
40 | @Component | 41 | @Component |
41 | export default class GalleryThumbnail extends Vue { | 42 | export default class GalleryThumbnail extends Vue { |
@@ -43,9 +44,13 @@ export default class GalleryThumbnail extends Vue { | |||
43 | 44 | ||
44 | loading: boolean = false; | 45 | loading: boolean = false; |
45 | 46 | ||
46 | get pictureSrc() { | 47 | pictureSrc() { |
47 | return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail}`; | 48 | return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail}`; |
48 | } | 49 | } |
50 | |||
51 | getIcon() { | ||
52 | return Tools.getIcon(this.item); | ||
53 | } | ||
49 | } | 54 | } |
50 | </script> | 55 | </script> |
51 | 56 | ||