diff --git a/src/client/app/common/views/components/reactions-viewer.vue b/src/client/app/common/views/components/reactions-viewer.vue index 23f4b59d6..c30fa2a1d 100644 --- a/src/client/app/common/views/components/reactions-viewer.vue +++ b/src/client/app/common/views/components/reactions-viewer.vue @@ -1,16 +1,16 @@ @@ -22,6 +22,17 @@ export default Vue.extend({ computed: { reactions(): number { return this.note.reactionCounts; + }, + notReacted(): boolean { + return this.note.myReaction == null; + } + }, + methods: { + react(reaction: string) { + (this as any).api('notes/reactions/create', { + noteId: this.note.id, + reaction: reaction + }); } } }); @@ -40,6 +51,9 @@ root(isDark) > span margin-right 8px + &.notReacted + cursor pointer + > .mk-reaction-icon font-size 1.4em