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" :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,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue