diff options
| author | Mar0xy <marie@kaifa.ch> | 2023-09-23 01:26:57 +0200 |
|---|---|---|
| committer | Mar0xy <marie@kaifa.ch> | 2023-09-23 01:26:57 +0200 |
| commit | 7f0863a96ea5a9f6224a95e63af9eae4d21e61ac (patch) | |
| tree | 186f88d2975023b90e09a24856f865706e10af23 /packages/frontend/src/components/MkSubNoteContent.vue | |
| parent | Merge branch 'develop' of https://github.com/transfem-org/Sharkey into develop (diff) | |
| download | sharkey-7f0863a96ea5a9f6224a95e63af9eae4d21e61ac.tar.gz sharkey-7f0863a96ea5a9f6224a95e63af9eae4d21e61ac.tar.bz2 sharkey-7f0863a96ea5a9f6224a95e63af9eae4d21e61ac.zip | |
fix: buttons opening post view
Diffstat (limited to 'packages/frontend/src/components/MkSubNoteContent.vue')
| -rw-r--r-- | packages/frontend/src/components/MkSubNoteContent.vue | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 34fdd1cce4..fff0639473 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -5,12 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-only <template> <div :class="[$style.root, { [$style.collapsed]: collapsed }]"> - <div> + <div @click="noteclick(note.id)"> <span v-if="note.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span> <span v-if="note.deletedAt" style="opacity: 0.5">({{ i18n.ts.deleted }})</span> - <MkA v-if="note.replyId" :class="$style.reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA> + <MkA v-if="note.replyId" :class="$style.reply" :to="`/notes/${note.replyId}`" v-on:click.stop><i class="ti ti-arrow-back-up"></i></MkA> <Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i" :emojiUrls="note.emojis"/> - <MkA v-if="note.renoteId" :class="$style.rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA> + <MkA v-if="note.renoteId" :class="$style.rp" :to="`/notes/${note.renoteId}`" v-on:click.stop>RN: ...</MkA> </div> <details v-if="note.files.length > 0"> <summary>({{ i18n.t('withNFiles', { n: note.files.length }) }})</summary> @@ -37,11 +37,18 @@ import MkPoll from '@/components/MkPoll.vue'; import { i18n } from '@/i18n.js'; import { $i } from '@/account.js'; import { shouldCollapsed } from '@/scripts/collapsed.js'; +import { useRouter } from '@/router.js'; const props = defineProps<{ note: Misskey.entities.Note; }>(); +const router = useRouter(); + +function noteclick(id: string) { + router.push(`/notes/${id}`); +} + const isLong = shouldCollapsed(props.note); const collapsed = $ref(isLong); |