mirror of
https://github.com/misskey-dev/misskey
synced 2024-12-12 21:59:02 +09:00
tooltipは出せるように
This commit is contained in:
parent
e9ef8fc75a
commit
3c71c565e3
@ -58,7 +58,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<div :class="$style.noteHeaderUsername"><MkAcct :user="appearNote.user"/></div>
|
<div :class="$style.noteHeaderUsername"><MkAcct :user="appearNote.user"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.noteHeaderInfo">
|
<div :class="$style.noteHeaderInfo">
|
||||||
<a v-if="inEmbedPage" :href="url" :class="$style.noteHeaderInstanceIconLink" target="_blank" rel="noopener noreferrer">
|
<a v-if="inEmbedPage" v-tooltip="instanceName" :href="url" :class="$style.noteHeaderInstanceIconLink" target="_blank" rel="noopener noreferrer">
|
||||||
<img :src="instance.iconUrl || '/favicon.ico'" alt="" :class="$style.noteHeaderInstanceIcon"/>
|
<img :src="instance.iconUrl || '/favicon.ico'" alt="" :class="$style.noteHeaderInstanceIcon"/>
|
||||||
</a>
|
</a>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@ -283,7 +283,7 @@ import MkPagination, { type Paging } from '@/components/MkPagination.vue';
|
|||||||
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { isEnabledUrlPreview, instance } from '@/instance.js';
|
import { isEnabledUrlPreview, instance } from '@/instance.js';
|
||||||
import { url } from '@/config.js';
|
import { url, instanceName } from '@/config.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
note: Misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
|
@ -59,6 +59,8 @@ export default {
|
|||||||
targetElement: el,
|
targetElement: el,
|
||||||
}, {
|
}, {
|
||||||
closed: () => dispose(),
|
closed: () => dispose(),
|
||||||
|
}, {
|
||||||
|
callEvenOnEmbedPage: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
self._close = () => {
|
self._close = () => {
|
||||||
|
@ -169,12 +169,21 @@ type EmitsExtractor<T> = {
|
|||||||
[K in keyof T as K extends `onVnode${string}` ? never : K extends `on${infer E}` ? Uncapitalize<E> : K extends string ? never : K]: T[K];
|
[K in keyof T as K extends `onVnode${string}` ? never : K extends `on${infer E}` ? Uncapitalize<E> : K extends string ? never : K]: T[K];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type PopupOptions = {
|
||||||
|
callEvenOnEmbedPage?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
export function popup<T extends Component>(
|
export function popup<T extends Component>(
|
||||||
component: T,
|
component: T,
|
||||||
props: ComponentProps<T>,
|
props: ComponentProps<T>,
|
||||||
events: ComponentEmit<T> = {} as ComponentEmit<T>,
|
events: ComponentEmit<T> = {} as ComponentEmit<T>,
|
||||||
|
options: PopupOptions = {},
|
||||||
): { dispose: () => void } {
|
): { dispose: () => void } {
|
||||||
if (embedPage) return { dispose: () => {} };
|
const _options = Object.assign({
|
||||||
|
callEvenOnEmbedPage: false,
|
||||||
|
}, options) as Required<PopupOptions>;
|
||||||
|
|
||||||
|
if (embedPage && !_options.callEvenOnEmbedPage) return { dispose: () => {} };
|
||||||
|
|
||||||
markRaw(component);
|
markRaw(component);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user