1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 21:58:12 +09:00

fix(frontend): 非ログイン状態でもaタグに画像のURLがリンクされている問題を修正 (MisskeyIO#505)

This commit is contained in:
まっちゃとーにゅ 2024-03-06 03:52:19 +09:00 committed by GitHub
parent 5739f5efc2
commit c9f576669f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<div :class="[hide ? $style.hidden : $style.visible, (image.isSensitive && defaultStore.state.highlightSensitiveMedia) && $style.sensitive]" :style="darkMode ? '--c: rgb(255 255 255 / 2%);' : '--c: rgb(0 0 0 / 2%);'" @click="showHiddenContent"> <div :class="[hide ? $style.hidden : $style.visible, (image.isSensitive && defaultStore.state.highlightSensitiveMedia) && $style.sensitive]" :style="darkMode ? '--c: rgb(255 255 255 / 2%);' : '--c: rgb(0 0 0 / 2%);'" @click="showHiddenContent">
<component <component
:is="disableImageLink ? 'div' : 'a'" :is="(image.isSensitive && !$i) || disableImageLink ? 'div' : 'a'"
v-bind="disableImageLink ? { v-bind="(image.isSensitive && !$i) || disableImageLink ? {
title: image.name, title: image.name,
class: $style.imageContainer, class: $style.imageContainer,
} : { } : {
@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
> >
<ImgWithBlurhash <ImgWithBlurhash
:hash="image.blurhash" :hash="image.blurhash"
:src="(props.image.isSensitive && !$i) || (defaultStore.state.dataSaver.media && hide) ? null : url" :src="(image.isSensitive && !$i) || (defaultStore.state.dataSaver.media && hide) ? null : url"
:forceBlurhash="hide" :forceBlurhash="hide"
:cover="hide || cover" :cover="hide || cover"
:alt="image.comment || image.name" :alt="image.comment || image.name"