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/tools.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'viewer/src/tools.ts') 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 -- cgit v1.2.3