From c1acd2e98c4113870b75c2fc5d5d0685fb6cff85 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/MkMediaImage.vue | 2 +- packages/client/src/components/MkMediaList.vue | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/client/src/components/MkMediaImage.vue b/packages/client/src/components/MkMediaImage.vue index c620b73c5..73854352b 100644 --- a/packages/client/src/components/MkMediaImage.vue +++ b/packages/client/src/components/MkMediaImage.vue @@ -13,7 +13,7 @@ :href="image.url" :title="image.name" > - +
GIF
diff --git a/packages/client/src/components/MkMediaList.vue b/packages/client/src/components/MkMediaList.vue index 174ed8380..b9eb67913 100644 --- a/packages/client/src/components/MkMediaList.vue +++ b/packages/client/src/components/MkMediaList.vue @@ -46,8 +46,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]; @@ -90,8 +89,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; }); @@ -117,7 +115,7 @@ onMounted(() => { el.onpointermove = preventProp; pwsp.on('change', () => { - textBox.textContent = pwsp.currSlide.data.comment?.trim(); + textBox.textContent = pwsp.currSlide.data.alt?.trim(); }); }, });