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 ++--- 2 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 viewer/src/components/LdError.vue (limited to 'viewer/src/components') 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; - } } -- cgit v1.2.3 From f328a730b516f5e9104f85e553c083c2865660a8 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 4 May 2020 00:10:39 +0200 Subject: viewer/galleryStore: unify resource root parametrisation --- viewer/src/components/LdPicture.vue | 2 +- viewer/src/components/LdThumbnail.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdPicture.vue b/viewer/src/components/LdPicture.vue index de46bcb..78829ec 100644 --- a/viewer/src/components/LdPicture.vue +++ b/viewer/src/components/LdPicture.vue @@ -76,7 +76,7 @@ export default class LdPicture extends Vue { } pictureSrc(resource: string) { - return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`; + return this.$galleryStore.resourceRoot + resource; } generateSlowLoadingStyle() { diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue index e774f00..bfcc595 100644 --- a/viewer/src/components/LdThumbnail.vue +++ b/viewer/src/components/LdThumbnail.vue @@ -47,7 +47,7 @@ export default class LdThumbnail extends Vue { loading: boolean = false; pictureSrc(resource: string) { - return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`; + return this.$galleryStore.resourceRoot + resource; } pictureStyle() { -- cgit v1.2.3 From 35456c6183c199b23ded85838414eb28a6d4b60f Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 4 May 2020 00:11:31 +0200 Subject: viewer/LdDownload: add generic file download handler GitHub: closes #209 --- viewer/src/components/LdDownload.vue | 67 ++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 viewer/src/components/LdDownload.vue (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdDownload.vue b/viewer/src/components/LdDownload.vue new file mode 100644 index 0000000..3b13e99 --- /dev/null +++ b/viewer/src/components/LdDownload.vue @@ -0,0 +1,67 @@ + + + + + + + -- cgit v1.2.3 From c175db32132201cefec699b69f71fb23bdd2c687 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 8 May 2020 19:03:09 +0200 Subject: viewer/LdDownload: fix item type and remove getters For consistency. --- viewer/src/components/LdDownload.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdDownload.vue b/viewer/src/components/LdDownload.vue index 3b13e99..f86d455 100644 --- a/viewer/src/components/LdDownload.vue +++ b/viewer/src/components/LdDownload.vue @@ -20,10 +20,10 @@ @@ -32,19 +32,19 @@ import { Component, Prop, Vue } from "vue-property-decorator"; @Component export default class LdDownload extends Vue { - @Prop({ required: true }) readonly item!: Gallery.Item; + @Prop({ required: true }) readonly item!: Gallery.Other; - get itemResource(): string { - return (this.item.properties as Gallery.OtherProperties).resource; + itemResource(): string { + return this.item.properties.resource; } - get itemFileName(): string { - const timeStamped = this.itemResource.split("/").pop() ?? ""; + itemFileName(): string { + const timeStamped = this.itemResource().split("/").pop() ?? ""; return timeStamped.split("?")[0]; } - get itemDownloadUrl(): string { - return this.$galleryStore.resourceRoot + this.itemResource; + itemDownloadUrl(): string { + return this.$galleryStore.resourceRoot + this.itemResource(); } } -- cgit v1.2.3 From 3cf40298471995fddea8a66860353a2b1ceeeeee Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 8 May 2020 19:04:29 +0200 Subject: viewer/LdError: fix prop constructor type --- viewer/src/components/LdError.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdError.vue b/viewer/src/components/LdError.vue index 5e266ab..4b958dc 100644 --- a/viewer/src/components/LdError.vue +++ b/viewer/src/components/LdError.vue @@ -31,8 +31,8 @@ import { Component, Prop, Vue } from "vue-property-decorator"; @Component export default class LdError extends Vue { - @Prop({ required: true }) readonly icon!: string; - @Prop({ required: true }) readonly message!: string; + @Prop({ required: true, type: String }) readonly icon!: string; + @Prop({ required: true, type: String }) readonly message!: string; } -- cgit v1.2.3 From e02b09f405c81fd3eb612b0bb1f78f5860b0a5e8 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 8 May 2020 19:10:52 +0200 Subject: viewer/style/global: factorise flex centering container --- viewer/src/components/LdDownload.vue | 9 +-------- viewer/src/components/LdError.vue | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdDownload.vue b/viewer/src/components/LdDownload.vue index f86d455..aea4123 100644 --- a/viewer/src/components/LdDownload.vue +++ b/viewer/src/components/LdDownload.vue @@ -19,7 +19,7 @@ -->