From 665139f7d25a64f66e1149a6403fc26efcbabb2a Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 3 May 2020 23:07:51 +0200 Subject: viewer/GalleryNavigation: better error messages Introducing a generic error page with some icon and a different error for unknown resources GitHub: closes #190 --- viewer/src/components/LdError.vue | 64 ++++++++++++++++++++++++++++++++++ viewer/src/components/LdGallery.vue | 8 ++--- viewer/src/locales/en.json | 3 +- viewer/src/plugins/fontawesome.ts | 2 ++ viewer/src/views/GalleryNavigation.vue | 32 ++++++++++++----- 5 files changed, 95 insertions(+), 14 deletions(-) create mode 100644 viewer/src/components/LdError.vue diff --git a/viewer/src/components/LdError.vue b/viewer/src/components/LdError.vue new file mode 100644 index 0000000..5e266ab --- /dev/null +++ b/viewer/src/components/LdError.vue @@ -0,0 +1,64 @@ + + + + + + + diff --git a/viewer/src/components/LdGallery.vue b/viewer/src/components/LdGallery.vue index 29c18b9..e512758 100644 --- a/viewer/src/components/LdGallery.vue +++ b/viewer/src/components/LdGallery.vue @@ -18,11 +18,11 @@ --> @@ -47,11 +47,9 @@ export default class LdPicture extends Vue { flex-wrap: wrap; align-items: center; justify-content: space-evenly; + & > a { margin: 2px; } - & .noresult { - margin-top: 40px; - } } diff --git a/viewer/src/locales/en.json b/viewer/src/locales/en.json index e6c1df2..c011552 100644 --- a/viewer/src/locales/en.json +++ b/viewer/src/locales/en.json @@ -7,7 +7,8 @@ "tag-propositions.addition": "Include all items with this tag", "tag-propositions.intersection": "Search for this tag", "tag-propositions.item-count": "Item count", - "gallery.unknowntype": "Unknown item type", + "gallery.unknown-type": "Could not display item of unknown type", + "gallery.unknown-resource": "Resource not found", "command.search": "Open/close search panel", "command.search.clear": "Clear", "command.search.search": "Search", diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index 480e8e0..933bce6 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -23,6 +23,7 @@ import { library, config } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { faFolder, + faFolderOpen, faEraser, faSearch, faPlus, @@ -38,6 +39,7 @@ import { library.add( faFolder, + faFolderOpen, faEraser, faSearch, faPlus, diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index 7c6d11b..08c8218 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue @@ -18,18 +18,14 @@ --> -- cgit v1.2.3