mirror of
https://github.com/sim1222/misskey.git
synced 2025-04-29 02:37:22 +09:00
improve reactionImportMenu
This commit is contained in:
parent
f31634d4f7
commit
0739a58d66
@ -5,7 +5,7 @@
|
|||||||
v-ripple="canToggle"
|
v-ripple="canToggle"
|
||||||
class="hkzvhatu _button"
|
class="hkzvhatu _button"
|
||||||
:class="{ reacted: note.myReaction == reaction, canToggle }"
|
:class="{ reacted: note.myReaction == reaction, canToggle }"
|
||||||
@click="toggleReaction()"
|
@click="toggleReaction"
|
||||||
@contextmenu.stop="onContextmenu"
|
@contextmenu.stop="onContextmenu"
|
||||||
>
|
>
|
||||||
<XReactionIcon class="icon" :reaction="reaction" :custom-emojis="note.emojis"/>
|
<XReactionIcon class="icon" :reaction="reaction" :custom-emojis="note.emojis"/>
|
||||||
@ -34,8 +34,10 @@ const buttonRef = ref<HTMLElement>();
|
|||||||
|
|
||||||
const canToggle = computed(() => !props.reaction.match(/@\w/) && $i);
|
const canToggle = computed(() => !props.reaction.match(/@\w/) && $i);
|
||||||
|
|
||||||
const toggleReaction = () => {
|
const toggleReaction = (e: MouseEvent) => {
|
||||||
if (!canToggle.value) return;
|
if (!canToggle.value) {
|
||||||
|
openReactionImportMenu(e, props.reaction, props.note.id);
|
||||||
|
}
|
||||||
|
|
||||||
const oldReaction = props.note.myReaction;
|
const oldReaction = props.note.myReaction;
|
||||||
if (oldReaction) {
|
if (oldReaction) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user