fix(MkUrlPreview): 外部サイトへのリンクは移動の前に警告を表示するように
This commit is contained in:
parent
92280818ae
commit
f7ec503b9c
|
@ -44,7 +44,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</template>
|
||||
<div v-else>
|
||||
<component :is="self ? 'MkA' : 'a'" :class="[$style.link, { [$style.compact]: compact }]" :[attr]="self ? url.substring(local.length) : url" rel="nofollow noopener" :target="target" :title="url">
|
||||
<component
|
||||
:is="self ? 'MkA' : 'a'"
|
||||
:class="[$style.link, { [$style.compact]: compact }]"
|
||||
:[attr]="self ? url.substring(local.length) : url"
|
||||
rel="nofollow noopener"
|
||||
:target="target"
|
||||
:title="url"
|
||||
@click="(ev: MouseEvent) => warningExternalWebsite(ev, url)"
|
||||
>
|
||||
<div v-if="thumbnail" :class="[$style.thumbnail, { [$style.thumbnailBlur]: sensitive }]" :style="defaultStore.state.dataSaver.urlPreview ? '' : `background-image: url('${thumbnail}')`">
|
||||
</div>
|
||||
<article :class="$style.body">
|
||||
|
@ -92,6 +100,7 @@ import { deviceKind } from '@/scripts/device-kind.js';
|
|||
import MkButton from '@/components/MkButton.vue';
|
||||
import { versatileLang } from '@/scripts/intl-const.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { warningExternalWebsite } from '@/scripts/warning-external-website.js';
|
||||
|
||||
type SummalyResult = Awaited<ReturnType<typeof summaly>>;
|
||||
|
||||
|
|
Loading…
Reference in New Issue