diff options
| author | Mar0xy <marie@kaifa.ch> | 2023-11-04 14:32:28 +0100 |
|---|---|---|
| committer | Mar0xy <marie@kaifa.ch> | 2023-11-04 14:32:28 +0100 |
| commit | 647e76ab36ee99d5c3e6da95cd4a941d6cbc8114 (patch) | |
| tree | 01039aa66e053c1da9cf9d04a9474b1b7756daf3 /packages/frontend/src/components/MkNoteDetailed.vue | |
| parent | upd: change misskey to sharkey, msky to shonk (diff) | |
| parent | New Crowdin updates (#12241) (diff) | |
| download | sharkey-647e76ab36ee99d5c3e6da95cd4a941d6cbc8114.tar.gz sharkey-647e76ab36ee99d5c3e6da95cd4a941d6cbc8114.tar.bz2 sharkey-647e76ab36ee99d5c3e6da95cd4a941d6cbc8114.zip | |
merge: upstream
Diffstat (limited to 'packages/frontend/src/components/MkNoteDetailed.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNoteDetailed.vue | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index fe26bcba89..8508629195 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -68,19 +68,28 @@ SPDX-License-Identifier: AGPL-3.0-only </header> <div :class="$style.noteContent"> <p v-if="appearNote.cw != null" :class="$style.cw"> - <Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'account'" :i="$i"/> + <Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'account'"/> <MkCwButton v-model="showContent" :note="appearNote"/> </p> <div v-show="appearNote.cw == null || showContent"> <span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span> <MkA v-if="appearNote.replyId" :class="$style.noteReplyTarget" :to="`/notes/${appearNote.replyId}`"><i class="ph-arrow-bend-left-up ph-bold pg-lg"></i></MkA> - <Mfm v-if="appearNote.text" :parsedNodes="parsed" :text="appearNote.text" :author="appearNote.user" :nyaize="'account'" :i="$i" :emojiUrls="appearNote.emojis"/> + <Mfm + v-if="appearNote.text" + :parsedNodes="parsed" + :text="appearNote.text" + :author="appearNote.user" + :nyaize="'account'" + :emojiUrls="appearNote.emojis" + :enableEmojiMenu="true" + :enableEmojiMenuReaction="true" + /> <a v-if="appearNote.renote != null" :class="$style.rn">RN:</a> <div v-if="translating || translation" :class="$style.translation"> <MkLoading v-if="translating" mini/> <div v-else> <b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b> - <Mfm :text="translation.text" :author="appearNote.user" :nyaize="'account'" :i="$i" :emojiUrls="appearNote.emojis"/> + <Mfm :text="translation.text" :author="appearNote.user" :nyaize="'account'" :emojiUrls="appearNote.emojis"/> </div> </div> <div v-if="appearNote.files.length > 0"> @@ -209,7 +218,7 @@ SPDX-License-Identifier: AGPL-3.0-only </template> <script lang="ts" setup> -import { computed, inject, onMounted, ref, shallowRef, watch } from 'vue'; +import { computed, inject, onMounted, provide, ref, shallowRef, watch } from 'vue'; import * as mfm from 'mfm-js'; import * as Misskey from 'misskey-js'; import MkNoteSub from '@/components/MkNoteSub.vue'; @@ -335,6 +344,13 @@ const keymap = { 's': () => showContent.value !== showContent.value, }; +provide('react', (reaction: string) => { + os.api('notes/reactions/create', { + noteId: appearNote.id, + reaction: reaction, + }); +}); + let tab = $ref('replies'); let reactionTabType = $ref(null); |