From 72a40b3139bea1eeb1ec39592a5ca32ceb932f23 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Wed, 17 May 2023 18:56:03 -0400 Subject: [PATCH 01/11] Display account info of post rather than 'Post' in header --- packages/client/src/pages/note.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/src/pages/note.vue b/packages/client/src/pages/note.vue index dbc2f2aa92..cee0bf854b 100644 --- a/packages/client/src/pages/note.vue +++ b/packages/client/src/pages/note.vue @@ -26,6 +26,7 @@ v-if="!showNext && hasNext" class="load next" @click="showNext = true" + v-tooltip="i18n.ts.loadMore" >
@@ -74,6 +75,7 @@ v-if="!showPrev && hasPrev" class="load prev" @click="showPrev = true" + v-tooltip="i18n.ts.loadMore" >
@@ -193,8 +195,8 @@ definePageMetadata( computed(() => note ? { - title: i18n.ts.note, - subtitle: new Date(note.createdAt).toLocaleString(), + title: note.user.name, + subtitle: `@${note.user.username}@${note.user.host}`, avatar: note.user, path: `/notes/${note.id}`, share: { From fb06aecb7b540bfbd48414e588a72f82e9bca362 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Wed, 17 May 2023 21:54:37 -0400 Subject: [PATCH 02/11] Jump to Reply + other note page improvmeents --- locales/en-US.yml | 3 +++ .../client/src/components/MkNoteDetailed.vue | 18 ++++++++++++++++-- packages/client/src/components/MkNoteSub.vue | 6 ++++++ .../client/src/components/MkSubNoteContent.vue | 8 ++++++-- packages/client/src/components/global/MkA.vue | 11 +++-------- .../src/components/global/MkPageHeader.vue | 7 ++++++- packages/client/src/pages/note.vue | 9 +++++++-- 7 files changed, 47 insertions(+), 15 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 254ab13466..ec24104b0c 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -57,8 +57,11 @@ sendMessage: "Send a message" copyUsername: "Copy username" searchUser: "Search for a user" reply: "Reply" +jumpToReply: "Jump to Reply" loadMore: "Load more" showMore: "Show more" +newer: "newer" +older: "older" showLess: "Close" youGotNewFollower: "followed you" receiveFollowRequest: "Follow request received" diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index b1caca1609..00c5ba9d25 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -15,20 +15,22 @@ :key="note.id" class="reply-to" :note="note" + :detailedView="true" /> -
+
@@ -39,6 +41,7 @@ :note="note" class="reply" :conversation="replies" + :detailedView="true" />
@@ -329,6 +332,9 @@ onMounted(() => { onUpdated(() => { if (!isScrolling) { noteEl?.scrollIntoView(); + if (location.hash) { + location.replace(location.hash); // Jump to highlighted reply + } } }); @@ -510,6 +516,14 @@ onUnmounted(() => { // } // } } + :deep(.reply:target > .main), + :deep(.reply-to:target) { + z-index: 2; + &::before { + outline: auto; + opacity: 1; + } + } &.max-width_500px { font-size: 0.9em; diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index f27b3e27a6..c0d2405e40 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -4,6 +4,8 @@ ref="el" v-size="{ max: [450, 500] }" class="wrpstxzv" + :id="detailedView ? appearNote.id : null" + tabindex="-1" :class="{ children: depth > 1, singleStart: replies.length == 1, @@ -138,6 +140,7 @@ :depth="depth" :replyLevel="replyLevel + 1" :parentId="appearNote.replyId" + :detailedView="detailedView" /> @@ -212,6 +216,7 @@ const props = withDefaults( note: misskey.entities.Note; conversation?: misskey.entities.Note[]; parentId?; + detailedView?; // how many notes are in between this one and the note being viewed in detail depth?: number; @@ -348,6 +353,7 @@ function noteClick(e) { diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index 631c7415aa..8815666936 100644 --- a/packages/client/src/components/MkRenoteButton.vue +++ b/packages/client/src/components/MkRenoteButton.vue @@ -7,7 +7,7 @@ @click="renote(false, $event)" > -

{{ count }}

+

{{ count }}