From f0a50bc2889416c8fb741147523b077719621130 Mon Sep 17 00:00:00 2001 From: Lhcfl Date: Sun, 14 Apr 2024 13:59:27 +0800 Subject: [PATCH 1/2] feat: show MkRemoteCaution in note history page --- packages/client/src/pages/note-history.vue | 74 ++++++++++++---------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/packages/client/src/pages/note-history.vue b/packages/client/src/pages/note-history.vue index f6fbf517a3..33cae5860a 100644 --- a/packages/client/src/pages/note-history.vue +++ b/packages/client/src/pages/note-history.vue @@ -4,30 +4,35 @@ > - - -
- - - -
-
+ +
+ + +
+ + + +
+
+
@@ -42,6 +47,7 @@ import XNote from "@/components/MkNote.vue"; import { i18n } from "@/i18n"; import { definePageMetadata } from "@/scripts/page-metadata"; import icon from "@/scripts/icon"; +import MkRemoteCaution from "@/components/MkRemoteCaution.vue"; const pagingComponent = ref>(); @@ -65,8 +71,7 @@ definePageMetadata( })), ); -const note = ref({} as entities.Note); -const loaded = ref(false); +const note = ref(null); onMounted(() => { api("notes/show", { @@ -79,20 +84,19 @@ onMounted(() => { res.replyId = null; note.value = res; - loaded.value = true; }); }); function convertNoteEditsToNotes(noteEdits: entities.NoteEdit[]) { const now: entities.NoteEdit = { id: "EditionNow", - noteId: note.value.id, - updatedAt: note.value.createdAt, - text: note.value.text, - cw: note.value.cw, - files: note.value.files, - fileIds: note.value.fileIds, - emojis: note.value.emojis, + noteId: note.value!.id, + updatedAt: note.value!.createdAt, + text: note.value!.text, + cw: note.value!.cw, + files: note.value!.files, + fileIds: note.value!.fileIds, + emojis: note.value!.emojis, }; return [now] @@ -108,7 +112,7 @@ function convertNoteEditsToNotes(noteEdits: entities.NoteEdit[]) { _shouldInsertAd_: false, files: noteEdit.files, fileIds: noteEdit.fileIds, - emojis: note.value.emojis.concat(noteEdit.emojis), + emojis: note.value!.emojis.concat(noteEdit.emojis), }); }); } From ebaefb9697f7705313ce477a1c6a7ed9ec71ad98 Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 22 Apr 2024 06:02:08 +0900 Subject: [PATCH 2/2] chore (minor, client): remove redundant attribute --- packages/client/src/pages/note-history.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/pages/note-history.vue b/packages/client/src/pages/note-history.vue index c3665d41bc..8c97448f72 100644 --- a/packages/client/src/pages/note-history.vue +++ b/packages/client/src/pages/note-history.vue @@ -5,7 +5,7 @@ /> -
+