From 0da4717983cbf192367e4fb16a5951bc6c27e4da Mon Sep 17 00:00:00 2001
From: Mar0xy
Date: Fri, 22 Sep 2023 23:56:00 +0200
Subject: [PATCH] upd: clicky click on replies
---
packages/backend/src/server/api/stream/types.ts | 2 +-
packages/frontend/src/components/MkNoteSub.vue | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/packages/backend/src/server/api/stream/types.ts b/packages/backend/src/server/api/stream/types.ts
index 9bdab19de..63aff64fc 100644
--- a/packages/backend/src/server/api/stream/types.ts
+++ b/packages/backend/src/server/api/stream/types.ts
@@ -144,7 +144,7 @@ export interface NoteStreamTypes {
};
updated: {
updatedAt: Date;
- }
+ };
}
type NoteStreamEventTypes = {
[key in keyof NoteStreamTypes]: {
diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue
index 2a3cd9bf0..490211fad 100644
--- a/packages/frontend/src/components/MkNoteSub.vue
+++ b/packages/frontend/src/components/MkNoteSub.vue
@@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
@@ -52,6 +52,7 @@ 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;
@@ -63,8 +64,14 @@ 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([]);