refactor(client): explicit showing property for tooltips (#9368)

This commit is contained in:
Kagami Sascha Rosylight 2022-12-22 16:59:11 +09:00 committed by GitHub
parent 049373de3b
commit 1b6473ac27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 7 deletions

View file

@ -16,7 +16,7 @@
import { } from 'vue';
import MkTooltip from './MkTooltip.vue';
const props = defineProps<{
defineProps<{
showing: boolean;
x: number;
y: number;

View file

@ -1,5 +1,5 @@
<template>
<MkTooltip ref="tooltip" :target-element="targetElement" :max-width="340" @closed="emit('closed')">
<MkTooltip ref="tooltip" :showing="showing" :target-element="targetElement" :max-width="340" @closed="emit('closed')">
<div class="beeadbfb">
<XReactionIcon :reaction="reaction" :custom-emojis="emojis" class="icon" :no-style="true"/>
<div class="name">{{ reaction.replace('@.', '') }}</div>
@ -12,7 +12,8 @@ import { } from 'vue';
import MkTooltip from './MkTooltip.vue';
import XReactionIcon from '@/components/MkReactionIcon.vue';
const props = defineProps<{
defineProps<{
showing: boolean;
reaction: string;
emojis: any[]; // TODO
targetElement: HTMLElement;

View file

@ -1,5 +1,5 @@
<template>
<MkTooltip ref="tooltip" :target-element="targetElement" :max-width="340" @closed="emit('closed')">
<MkTooltip ref="tooltip" :showing="showing" :target-element="targetElement" :max-width="340" @closed="emit('closed')">
<div class="bqxuuuey">
<div class="reaction">
<XReactionIcon :reaction="reaction" :custom-emojis="emojis" class="icon" :no-style="true"/>
@ -21,7 +21,8 @@ import { } from 'vue';
import MkTooltip from './MkTooltip.vue';
import XReactionIcon from '@/components/MkReactionIcon.vue';
const props = defineProps<{
defineProps<{
showing: boolean;
reaction: string;
users: any[]; // TODO
count: number;

View file

@ -1,5 +1,5 @@
<template>
<MkTooltip ref="tooltip" :target-element="targetElement" :max-width="250" @closed="emit('closed')">
<MkTooltip ref="tooltip" :showing="showing" :target-element="targetElement" :max-width="250" @closed="emit('closed')">
<div class="beaffaef">
<div v-for="u in users" :key="u.id" class="user">
<MkAvatar class="avatar" :user="u"/>
@ -14,7 +14,8 @@
import { } from 'vue';
import MkTooltip from './MkTooltip.vue';
const props = defineProps<{
defineProps<{
showing: boolean;
users: any[]; // TODO
count: number;
targetElement: HTMLElement;