From 1913648047629decc2c55ab53006dad58c74980a Mon Sep 17 00:00:00 2001 From: Free Date: Mon, 20 Mar 2023 02:31:02 +0000 Subject: [PATCH] note-improvements (#9734) Not sure if this is the best way to jump to the post This also lets you select text w/out clicking to the post (and clicking normally on top of the text opens the post) Co-authored-by: Freeplay Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9734 Co-authored-by: Free Co-committed-by: Free --- packages/client/src/components/MkNote.vue | 16 ++++++--- .../client/src/components/MkNoteDetailed.vue | 34 ++++++++++++++----- packages/client/src/components/MkNoteSub.vue | 12 +++++-- packages/client/src/style.scss | 1 - 4 files changed, 48 insertions(+), 15 deletions(-) diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index 08075e531..1ed23b3ff 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -33,7 +33,7 @@ -
+
@@ -41,16 +41,16 @@

- +

- +
-
+
{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}:
@@ -264,6 +264,14 @@ function focusAfter() { focusNext(el.value); } +function noteClick(e) { + if (document.getSelection().type === 'Range') { + e.stopPropagation(); + } else { + router.push(notePage(appearNote)) + } +} + function readPromo() { os.api('promo/read', { noteId: appearNote.id, diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index f29129f87..03e9e728b 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -9,8 +9,8 @@ :tabindex="!isDeleted ? '-1' : null" :class="{ renote: isRenote }" > - - + +
@@ -29,7 +29,7 @@
-
+
@@ -99,7 +99,7 @@
- +
@@ -113,7 +113,7 @@