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> | ||||
| 					<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"/> | ||||
| 						</a> | ||||
| 						<template v-else> | ||||
|  | @ -283,7 +283,7 @@ import MkPagination, { type Paging } from '@/components/MkPagination.vue'; | |||
| import MkReactionIcon from '@/components/MkReactionIcon.vue'; | ||||
| import MkButton from '@/components/MkButton.vue'; | ||||
| import { isEnabledUrlPreview, instance } from '@/instance.js'; | ||||
| import { url } from '@/config.js'; | ||||
| import { url, instanceName } from '@/config.js'; | ||||
| 
 | ||||
| const props = withDefaults(defineProps<{ | ||||
| 	note: Misskey.entities.Note; | ||||
|  |  | |||
|  | @ -59,6 +59,8 @@ export default { | |||
| 				targetElement: el, | ||||
| 			}, { | ||||
| 				closed: () => dispose(), | ||||
| 			}, { | ||||
| 				callEvenOnEmbedPage: true, | ||||
| 			}); | ||||
| 
 | ||||
| 			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]; | ||||
| }; | ||||
| 
 | ||||
| type PopupOptions = { | ||||
| 	callEvenOnEmbedPage?: boolean; | ||||
| }; | ||||
| 
 | ||||
| export function popup<T extends Component>( | ||||
| 	component: T, | ||||
| 	props: ComponentProps<T>, | ||||
| 	events: ComponentEmit<T> = {} as ComponentEmit<T>, | ||||
| 	options: PopupOptions = {}, | ||||
| ): { dispose: () => void } { | ||||
| 	if (embedPage) return { dispose: () => {} }; | ||||
| 	const _options = Object.assign({ | ||||
| 		callEvenOnEmbedPage: false, | ||||
| 	}, options) as Required<PopupOptions>; | ||||
| 
 | ||||
| 	if (embedPage && !_options.callEvenOnEmbedPage) return { dispose: () => {} }; | ||||
| 
 | ||||
| 	markRaw(component); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue