fix: buttons opening post view

This commit is contained in:
Mar0xy 2023-09-23 01:26:57 +02:00
parent fada5fe035
commit 7f0863a96e
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 19 additions and 19 deletions

View file

@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<Mfm v-if="note.cw != ''" style="margin-right: 8px;" :text="note.cw" :author="note.user" :i="$i"/>
<MkCwButton v-model="showContent" :note="note"/>
</p>
<div v-show="note.cw == null || showContent" @click="noteclick(note.id)">
<div v-show="note.cw == null || showContent">
<MkSubNoteContent :class="$style.text" :note="note"/>
</div>
</div>
@ -52,7 +52,6 @@ import { $i } from '@/account.js';
import { userPage } from "@/filters/user";
import { checkWordMute } from "@/scripts/check-word-mute";
import { defaultStore } from "@/store";
import { useRouter } from '@/router.js';
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
@ -64,14 +63,8 @@ const props = withDefaults(defineProps<{
depth: 1,
});
const router = useRouter();
const muted = ref(checkWordMute(props.note, $i, defaultStore.state.mutedWords));
function noteclick(id: string) {
router.push(`/notes/${id}`);
}
let showContent = $ref(false);
let replies: Misskey.entities.Note[] = $ref([]);