open links in abuse comment in new window (#13381)
* feat: changing MkA behavior from MkMFM * chore: open links in abuse comment in new window * docs(changelog): 通報のコメント内のリンクをクリックした際、ウィンドウで開くように * chore: use inject instead of prop drilling * Revert "chore: use inject instead of prop drilling" This reverts commit b4dd14eacf59c8079676aa6ab019fece67496d79.
This commit is contained in:
parent
fe1172fbb6
commit
8e8ee2ac73
7 changed files with 24 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template>
|
||||
<component
|
||||
:is="self ? 'MkA' : 'a'" ref="el" style="word-break: break-all;" class="_link" :[attr]="self ? url.substring(local.length) : url" :rel="rel ?? 'nofollow noopener'" :target="target"
|
||||
:behavior="props.behavior"
|
||||
:title="url"
|
||||
>
|
||||
<slot></slot>
|
||||
|
|
@ -19,10 +20,12 @@ import { url as local } from '@/config.js';
|
|||
import { useTooltip } from '@/scripts/use-tooltip.js';
|
||||
import * as os from '@/os.js';
|
||||
import { isEnabledUrlPreview } from '@/instance.js';
|
||||
import { MkABehavior } from '@/components/global/MkA.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
url: string;
|
||||
rel?: null | string;
|
||||
behavior?: MkABehavior;
|
||||
}>(), {
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue