From c4a51940295d514dd52f48b6f18638ac554224f4 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Wed, 29 Jan 2020 05:35:35 +0100 Subject: viewer: Tag auto-completion should be more flexible. Resolves #38 --- viewer/src/components/LdTagInput.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue index 71131e6..7c9981f 100644 --- a/viewer/src/components/LdTagInput.vue +++ b/viewer/src/components/LdTagInput.vue @@ -42,6 +42,7 @@ - - -- cgit v1.2.3 From 234d0d13c767786393494810526a77d3d89b0e83 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 30 Jan 2020 17:01:56 +0100 Subject: viewer: global keypress componant. ESC gets out of fullscreen. --- viewer/src/components/LdKeyPress.vue | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 viewer/src/components/LdKeyPress.vue (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdKeyPress.vue b/viewer/src/components/LdKeyPress.vue new file mode 100644 index 0000000..8276607 --- /dev/null +++ b/viewer/src/components/LdKeyPress.vue @@ -0,0 +1,49 @@ + + + \ No newline at end of file -- cgit v1.2.3 From 42105af46681d81959a5d5a9a16ec9e98463a92e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 30 Jan 2020 21:24:15 +0100 Subject: viewer: new breadcrumb. navigation buttons. and styling improvements --- viewer/src/components/LdProposition.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue index 9a32e0a..f653e4d 100644 --- a/viewer/src/components/LdProposition.vue +++ b/viewer/src/components/LdProposition.vue @@ -19,7 +19,7 @@ @@ -36,12 +42,35 @@ import { Component, Vue, Prop } from "vue-property-decorator"; export default class LdPicture extends Vue { @Prop({ required: true }) readonly picture!: Gallery.Picture; + readonly SLOW_LOADING_TIMEOUT_MS: number = 1500; + dragging: boolean = false; + slowLoadingStyle: string | null = null; + timer: NodeJS.Timeout | null = null; + + mounted() { + if (this.picture.thumbnail) this.timer = setTimeout(this.generateSlowLoadingStyle, this.SLOW_LOADING_TIMEOUT_MS); + } + + destroyed() { + this.clearTimer(); + } + + clearTimer() { + if (this.timer) clearTimeout(this.timer); + this.timer = null; + this.slowLoadingStyle = null; + } - get pictureSrc() { + pictureSrc() { return `${process.env.VUE_APP_DATA_URL}${this.picture.properties.resource}`; } + generateSlowLoadingStyle() { + this.clearTimer(); + this.slowLoadingStyle = `background-image: url('${process.env.VUE_APP_DATA_URL}${this.picture.thumbnail}');`; + } + onClick() { if (!this.dragging) this.$uiStore.toggleFullscreen(); this.dragging = false; @@ -50,6 +79,22 @@ export default class LdPicture extends Vue { -- cgit v1.2.3 From a7b235d8874fe4ad1d7e7a5ce59510d9f55b857d Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 2 Feb 2020 03:11:30 +0100 Subject: viewer: fixed the command button's titles (somehow the `:` were removed before the commit) --- viewer/src/components/LdCommand.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue index 07cb354..8c6ccfc 100644 --- a/viewer/src/components/LdCommand.vue +++ b/viewer/src/components/LdCommand.vue @@ -19,16 +19,16 @@ @@ -46,20 +46,22 @@ export default class LdPicture extends Vue { dragging: boolean = false; slowLoadingStyle: string | null = null; + loader: boolean = false; timer: NodeJS.Timeout | null = null; mounted() { - if (this.picture.thumbnail) this.timer = setTimeout(this.generateSlowLoadingStyle, this.SLOW_LOADING_TIMEOUT_MS); + this.timer = setTimeout(this.generateSlowLoadingStyle, this.SLOW_LOADING_TIMEOUT_MS); } destroyed() { - this.clearTimer(); + this.clearSlowLoading(); } - clearTimer() { + clearSlowLoading() { if (this.timer) clearTimeout(this.timer); this.timer = null; this.slowLoadingStyle = null; + this.loader = false; } pictureSrc() { @@ -67,8 +69,10 @@ export default class LdPicture extends Vue { } generateSlowLoadingStyle() { - this.clearTimer(); - this.slowLoadingStyle = `background-image: url('${process.env.VUE_APP_DATA_URL}${this.picture.thumbnail}');`; + this.clearSlowLoading(); + this.loader = true; + if (this.picture.thumbnail) + this.slowLoadingStyle = `background-image: url('${process.env.VUE_APP_DATA_URL}${this.picture.thumbnail.resource}');`; } onClick() { diff --git a/viewer/src/components/LdThumbnail.vue b/viewer/src/components/LdThumbnail.vue index 44a4c00..d9343dd 100644 --- a/viewer/src/components/LdThumbnail.vue +++ b/viewer/src/components/LdThumbnail.vue @@ -45,7 +45,7 @@ export default class LdThumbnail extends Vue { loading: boolean = false; pictureSrc() { - return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail}`; + if (this.item.thumbnail) return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail.resource}`; } getIcon() { -- cgit v1.2.3 From b88adf17c2ff40f051b356bcfab006ff3a7fbc97 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 2 Feb 2020 05:20:24 +0100 Subject: viewer: disabled colour is now static instead of an arbitrary alpha --- viewer/src/components/LdBreadcrumb.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdBreadcrumb.vue b/viewer/src/components/LdBreadcrumb.vue index 8c5b7eb..171e96a 100644 --- a/viewer/src/components/LdBreadcrumb.vue +++ b/viewer/src/components/LdBreadcrumb.vue @@ -42,8 +42,10 @@ export default class LdBreadcrumb extends Vue { -- cgit v1.2.3 From 31d16f6fb20eb4935fc75e83bc565070ba7e5656 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 2 Feb 2020 19:59:29 +0100 Subject: viewer: crash fix for proposed tags when using discriminant format --- viewer/src/components/LdProposition.vue | 1 + 1 file changed, 1 insertion(+) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue index 6be0aee..0a293a9 100644 --- a/viewer/src/components/LdProposition.vue +++ b/viewer/src/components/LdProposition.vue @@ -58,6 +58,7 @@ export default class LdProposition extends Vue { } else { // Tags count from the current directory this.$galleryStore.currentItem?.tags + .flatMap(tag => tag.split(".")) .map(tag => this.$galleryStore.tags[tag]) // FIXME: Folders with the same name are merged in the index .forEach(tagindex => (propositions[tagindex.tag] = tagindex.items.length)); } -- cgit v1.2.3 From b8160585c4ea0037772c6a35c45b58d48621cd4d Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 8 Feb 2020 18:09:36 +0100 Subject: viewer: ldcommand: fix keyboard navigation By using proper semantics, using 'a' instead of 'div' to allow keyboard selection --- viewer/src/components/LdCommand.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'viewer/src/components') diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue index 8c6ccfc..841d773 100644 --- a/viewer/src/components/LdCommand.vue +++ b/viewer/src/components/LdCommand.vue @@ -19,15 +19,15 @@