client: don't use filename as alt text

This partially reverts commit e9ab42c10afb4e27516c2d2b5e3e06630efe9edd
as explained at <https://akkoma.dev/FoundKeyGang/FoundKey/pulls/178#issuecomment-3763>.
This commit is contained in:
Johann150 2022-10-01 22:39:58 +02:00 committed by ThatOneCalculator
parent 35bfa89b27
commit c1acd2e98c
2 changed files with 4 additions and 6 deletions

View file

@ -13,7 +13,7 @@
:href="image.url"
:title="image.name"
>
<ImgWithBlurhash :hash="image.blurhash" :src="url" :alt="image.comment || image.name" :title="image.comment || image.name" :cover="false"/>
<ImgWithBlurhash :hash="image.blurhash" :src="url" :alt="image.comment" :title="image.comment" :cover="false"/>
<div v-if="image.type === 'image/gif'" class="gif">GIF</div>
</a>
<button v-tooltip="i18n.ts.hide" class="_button hide" @click="hide = true"><i class="ph-eye-slash-bold ph-lg"></i></button>

View file

@ -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();
});
},
});