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" :class="$style.root" class="_link" :[attr]="self ? props.url.substring(local.length) : props.url" :rel="rel ?? 'nofollow noopener'" :target="target"
|
||||
:behavior = "props.behavior"
|
||||
@contextmenu.stop="() => {}"
|
||||
>
|
||||
<template v-if="!self">
|
||||
@@ -31,11 +32,13 @@ import * as os from '@/os.js';
|
||||
import { useTooltip } from '@/scripts/use-tooltip.js';
|
||||
import { safeURIDecode } from '@/scripts/safe-uri-decode.js';
|
||||
import { isEnabledUrlPreview } from '@/instance.js';
|
||||
import { MkABehavior } from '@/components/global/MkA.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
url: string;
|
||||
rel?: string;
|
||||
showUrlPreview?: boolean;
|
||||
behavior?: MkABehavior;
|
||||
}>(), {
|
||||
showUrlPreview: true,
|
||||
});
|
||||
|
Reference in New Issue
Block a user