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 b4dd14eacf
.
This commit is contained in:
@@ -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;
|
||||
}>(), {
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user