forked from FoundKeyGang/FoundKey
client: don't use filename as alt text
This partially reverts commit e9ab42c10a
as explained at <FoundKeyGang/FoundKey#178 (comment)>.
This commit is contained in:
parent
40c2e8f846
commit
f571f61c2d
2 changed files with 4 additions and 6 deletions
|
@ -13,7 +13,7 @@
|
||||||
:href="image.url"
|
:href="image.url"
|
||||||
:title="image.name"
|
: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>
|
<div v-if="image.type === 'image/gif'" class="gif">GIF</div>
|
||||||
</a>
|
</a>
|
||||||
<button v-tooltip="i18n.ts.hide" class="_button hide" @click="hide = true"><i class="fas fa-eye-slash"></i></button>
|
<button v-tooltip="i18n.ts.hide" class="_button hide" @click="hide = true"><i class="fas fa-eye-slash"></i></button>
|
||||||
|
|
|
@ -43,8 +43,7 @@ onMounted(() => {
|
||||||
src: media.url,
|
src: media.url,
|
||||||
w: media.properties.width,
|
w: media.properties.width,
|
||||||
h: media.properties.height,
|
h: media.properties.height,
|
||||||
alt: media.comment || media.name,
|
alt: media.comment,
|
||||||
comment: media.comment,
|
|
||||||
};
|
};
|
||||||
if (media.properties.orientation != null && media.properties.orientation >= 5) {
|
if (media.properties.orientation != null && media.properties.orientation >= 5) {
|
||||||
[item.w, item.h] = [item.h, item.w];
|
[item.w, item.h] = [item.h, item.w];
|
||||||
|
@ -87,8 +86,7 @@ onMounted(() => {
|
||||||
[itemData.w, itemData.h] = [itemData.h, itemData.w];
|
[itemData.w, itemData.h] = [itemData.h, itemData.w];
|
||||||
}
|
}
|
||||||
itemData.msrc = file.thumbnailUrl;
|
itemData.msrc = file.thumbnailUrl;
|
||||||
itemData.alt = file.comment || file.name;
|
itemData.alt = file.comment;
|
||||||
itemData.comment = file.comment;
|
|
||||||
itemData.thumbCropped = true;
|
itemData.thumbCropped = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -114,7 +112,7 @@ onMounted(() => {
|
||||||
el.onpointermove = preventProp;
|
el.onpointermove = preventProp;
|
||||||
|
|
||||||
pwsp.on('change', () => {
|
pwsp.on('change', () => {
|
||||||
textBox.textContent = pwsp.currSlide.data.comment?.trim();
|
textBox.textContent = pwsp.currSlide.data.alt?.trim();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue