Skip to content

Commit

Permalink
https://github.com/misskey-dev/misskey/pull/9841#issuecomment-1423786235
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Feb 9, 2023
1 parent f8e4d40 commit ec1315b
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions packages/frontend/src/components/MkNote.vue
Expand Up @@ -73,13 +73,7 @@
<MkA v-if="appearNote.channel && !inChannel" :class="$style.channel" :to="`/channels/${appearNote.channel.id}`"><i class="ti ti-device-tv"></i> {{ appearNote.channel.name }}</MkA>
</div>
<footer :class="$style.footer">
<MkReactionsViewer ref="reactionsViewer" :note="appearNote" :max-number="16">
<template v-slot:extras>
<button v-if="Object.keys(appearNote.reactions).length > 0" class="_button" :class="$style.reactionDetailsButton" @click="showReactions">
<i class="ti ti-info-circle"></i>
</button>
</template>
</MkReactionsViewer>
<MkReactionsViewer ref="reactionsViewer" :note="appearNote" :max-number="16" />
<button :class="$style.footerButton" class="_button" @click="reply()">
<i class="ti ti-arrow-back-up"></i>
<p v-if="appearNote.repliesCount > 0" :class="$style.footerButtonCount">{{ appearNote.repliesCount }}</p>
Expand All @@ -100,8 +94,8 @@
<button v-if="appearNote.myReaction == null" ref="reactButton" :class="$style.footerButton" class="_button" @mousedown="react()">
<i class="ti ti-plus"></i>
</button>
<button v-if="appearNote.myReaction != null" ref="reactButton" :class="$style.footerButton" class="_button" @click="undoReact(appearNote)">
<i class="ti ti-minus"></i>
<button v-else ref="reactButton" :class="$style.footerButton" class="_button" @click="showReactions">
<i class="ti ti-plus"></i>
</button>
<button ref="menuButton" :class="$style.footerButton" class="_button" @mousedown="menu()">
<i class="ti ti-dots"></i>
Expand Down Expand Up @@ -283,14 +277,6 @@ function react(viaKeyboard = false): void {
});
}
function undoReact(note): void {
const oldReaction = note.myReaction;
if (!oldReaction) return;
os.api('notes/reactions/delete', {
noteId: note.id,
});
}
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>('currentClipPage', null);
function onContextmenu(ev: MouseEvent): void {
Expand Down

0 comments on commit ec1315b

Please sign in to comment.