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/plugins/fontawesome.ts | 2 ++
viewer/src/tools.ts | 12 ++++++++++++
viewer/src/views/GalleryThumbnail.vue | 11 ++++++++---
viewer/src/views/TopBreadcrumb.vue | 9 ++-------
4 files changed, 24 insertions(+), 10 deletions(-)
(limited to 'viewer')
diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts
index fdbfcdb..460e407 100644
--- a/viewer/src/plugins/fontawesome.ts
+++ b/viewer/src/plugins/fontawesome.ts
@@ -33,6 +33,7 @@ import {
faTags,
faAngleRight,
faWindowClose,
+ faQuestionCircle,
} from "@fortawesome/free-solid-svg-icons";
library.add(
@@ -47,6 +48,7 @@ library.add(
faTags,
faAngleRight,
faWindowClose,
+ faQuestionCircle,
);
Vue.component("fa-icon", FontAwesomeIcon);
diff --git a/viewer/src/tools.ts b/viewer/src/tools.ts
index 57a889d..94fdf33 100644
--- a/viewer/src/tools.ts
+++ b/viewer/src/tools.ts
@@ -43,5 +43,17 @@ export default class Tools {
];
}
+ public static getIcon(item: Gallery.Item): string {
+ if (item.path.length <= 1) return "home";
+ switch (item.properties.type) {
+ case "picture":
+ return "image";
+ case "directory":
+ return "folder";
+ case "other":
+ default:
+ return "question-circle";
+ }
+ }
}
\ No newline at end of file
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 @@