From f571f61c2d3afd9bb3a252620733d2b0368a4d9d Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 1 Oct 2022 22:39:58 +0200 Subject: [PATCH] client: don't use filename as alt text This partially reverts commit e9ab42c10afb4e27516c2d2b5e3e06630efe9edd as explained at . --- packages/client/src/components/media-image.vue | 2 +- packages/client/src/components/media-list.vue | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/client/src/components/media-image.vue b/packages/client/src/components/media-image.vue index 69b94514a..ac22557f9 100644 --- a/packages/client/src/components/media-image.vue +++ b/packages/client/src/components/media-image.vue @@ -13,7 +13,7 @@ :href="image.url" :title="image.name" > - +
GIF
diff --git a/packages/client/src/components/media-list.vue b/packages/client/src/components/media-list.vue index f9f017cfd..7e241d2da 100644 --- a/packages/client/src/components/media-list.vue +++ b/packages/client/src/components/media-list.vue @@ -43,8 +43,7 @@ onMounted(() => { src: media.url, w: media.properties.width, h: media.properties.height, - alt: media.comment || media.name, - comment: media.comment, + alt: media.comment, }; if (media.properties.orientation != null && media.properties.orientation >= 5) { [item.w, item.h] = [item.h, item.w]; @@ -87,8 +86,7 @@ onMounted(() => { [itemData.w, itemData.h] = [itemData.h, itemData.w]; } itemData.msrc = file.thumbnailUrl; - itemData.alt = file.comment || file.name; - itemData.comment = file.comment; + itemData.alt = file.comment; itemData.thumbCropped = true; }); @@ -114,7 +112,7 @@ onMounted(() => { el.onpointermove = preventProp; pwsp.on('change', () => { - textBox.textContent = pwsp.currSlide.data.comment?.trim(); + textBox.textContent = pwsp.currSlide.data.alt?.trim(); }); }, });