From 63e7ef894755deef318d9dcb129a94d34f33bdf2 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 31 Jan 2020 07:59:58 +0100
Subject: viewer: unknown types now show a question mark icon instead of a
 folder icon. this is unified with the breadcrumb

---
 viewer/src/views/GalleryThumbnail.vue | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'viewer/src/views/GalleryThumbnail.vue')

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 @@
     <v-lazy-image
       v-if="item.thumbnail"
       class="thumbnail"
-      :src="pictureSrc"
+      :src="pictureSrc()"
       :title="item.path"
       @intersect="loading=true"
       @load="loading=false"
     />
     <div v-else class="flex-column flex-center">
-      <fa-icon icon="folder" size="4x" />
+      <fa-icon :icon="getIcon()" size="4x" />
       {{item.title}}
     </div>
   </div>
@@ -36,6 +36,7 @@
 
 <script lang="ts">
 import { Component, Vue, Prop } from "vue-property-decorator";
+import Tools from "@/tools";
 
 @Component
 export default class GalleryThumbnail extends Vue {
@@ -43,9 +44,13 @@ export default class GalleryThumbnail extends Vue {
 
   loading: boolean = false;
 
-  get pictureSrc() {
+  pictureSrc() {
     return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail}`;
   }
+
+  getIcon() {
+    return Tools.getIcon(this.item);
+  }
 }
 </script>
 
-- 
cgit v1.2.3

