From 32f60f9969047413f850c80403daedf80e7adb69 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 3 Jan 2024 11:37:50 +0100 Subject: [PATCH 1/6] Bring renote indicator closer to note (like Firefish) --- packages/frontend/src/components/SkNote.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/SkNote.vue b/packages/frontend/src/components/SkNote.vue index b98e20bad6..fdf11c4f56 100644 --- a/packages/frontend/src/components/SkNote.vue +++ b/packages/frontend/src/components/SkNote.vue @@ -894,7 +894,7 @@ function emitUpdReaction(emoji: string, delta: number) { position: relative; display: flex; align-items: center; - padding: 24px 32px 16px calc(32px + var(--avatar) + 14px); + padding: 24px 32px 0 calc(32px + var(--avatar) + 14px); line-height: 28px; white-space: pre; color: var(--renote); From 43b3b5a34b164bda15c178cd0b39a5d073a2d5a9 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 3 Jan 2024 13:52:46 +0100 Subject: [PATCH 2/6] Ported Firefish's note focus behavior --- packages/frontend/src/components/SkNote.vue | 12 +++- .../src/components/SkNoteDetailed.vue | 58 +++++++++++++++++-- 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/packages/frontend/src/components/SkNote.vue b/packages/frontend/src/components/SkNote.vue index fdf11c4f56..b5b23386e7 100644 --- a/packages/frontend/src/components/SkNote.vue +++ b/packages/frontend/src/components/SkNote.vue @@ -776,6 +776,10 @@ function focusAfter() { focusNext(el.value); } +function scrollIntoView() { + el.value.scrollIntoView(); +} + function readPromo() { os.api('promo/read', { noteId: appearNote.value.id, @@ -790,6 +794,12 @@ function emitUpdReaction(emoji: string, delta: number) { emit('reaction', emoji); } } + +defineExpose({ + focus, + blur, + scrollIntoView, +});