This commit is contained in:
syuilo 2023-01-01 12:28:30 +09:00
parent ee6e022b2a
commit 527fe9046e
7 changed files with 80 additions and 10 deletions

View file

@ -19,6 +19,7 @@ import XReactionIcon from '@/components/MkReactionIcon.vue';
import * as os from '@/os';
import { useTooltip } from '@/scripts/use-tooltip';
import { $i } from '@/account';
import MkPlusOneEffect from '@/components/MkPlusOneEffect.vue';
const props = defineProps<{
reaction: string;
@ -57,7 +58,10 @@ const toggleReaction = () => {
const anime = () => {
if (document.hidden) return;
// TODO:
const rect = buttonRef.value.getBoundingClientRect();
const x = rect.left + (buttonRef.value.offsetWidth / 2);
const y = rect.top + (buttonRef.value.offsetHeight / 2);
os.popup(MkPlusOneEffect, { x, y }, {}, 'end');
};
watch(() => props.count, (newCount, oldCount) => {