@@ -219,6 +219,7 @@ import { isEnabledUrlPreview } from '@/instance.js';
import { type Keymap } from '@/scripts/hotkey.js';
import { focusPrev, focusNext } from '@/scripts/focus.js';
import { getAppearNote } from '@/scripts/get-appear-note.js';
+import { useRouter } from '@/router/supplier.js';
import { miLocalStorage } from '@/local-storage.js';
import detectLanguage from '@/scripts/detect-language.js';
@@ -238,6 +239,8 @@ const emit = defineEmits<{
(ev: 'removeReaction', emoji: string): void;
}>();
+const router = useRouter();
+
const inTimeline = inject('inTimeline', false);
const inChannel = inject('inChannel', null);
const currentClip = inject[ | null>('currentClip', null);
@@ -431,6 +434,13 @@ if (!props.mock) {
}
}
+function noteClickToOpen(id: string) {
+ const selection = document.getSelection();
+ if (selection?.toString().length === 0) {
+ router.push(`/notes/${id}`);
+ }
+}
+
function renote(viaKeyboard = false) {
pleaseLogin(undefined, pleaseLoginContext.value);
showMovedDialog();
diff --git a/packages/frontend/src/components/MkNoteHeader.vue b/packages/frontend/src/components/MkNoteHeader.vue
index 311673e14..a0fe23e5a 100644
--- a/packages/frontend/src/components/MkNoteHeader.vue
+++ b/packages/frontend/src/components/MkNoteHeader.vue
@@ -28,8 +28,8 @@ SPDX-License-Identifier: AGPL-3.0-only
]