diff --git a/components/notes/actions.vue b/components/notes/actions.vue index b5db37c..1a3eb9d 100644 --- a/components/notes/actions.vue +++ b/components/notes/actions.vue @@ -4,18 +4,18 @@ {{ numberFormat(replyCount) }} - + {{ numberFormat(likeCount) }} - + {{ numberFormat(reblogCount) }} - + @@ -25,26 +25,63 @@ @@ -86,11 +111,11 @@ const blockUser = async (id: string) => { - + Delete and redraft - + Delete ⌘D diff --git a/components/notes/note.vue b/components/notes/note.vue index b4614cf..6b0ddaf 100644 --- a/components/notes/note.vue +++ b/components/notes/note.vue @@ -13,7 +13,7 @@ + :api-note-string="JSON.stringify(note, null, 4)" :reblog-count="noteToUse.reblogs_count" :remote-url="noteToUse.url" :is-remote="isRemote" :author-id="noteToUse.account.id" @edit="useEvent('composer:edit', note)" @reply="useEvent('composer:reply', note)" @quote="useEvent('composer:quote', note)" @delete="useEvent('note:delete', note)" :note-id="noteToUse.id" :liked="noteToUse.favourited ?? false" :reblogged="noteToUse.reblogged ?? false" /> @@ -33,10 +33,10 @@ const { note } = defineProps<{ }>(); // Notes can be reblogs, in which case the actual thing to render is inside the reblog property -const noteToUse = note.reblog ? note.reblog : note; +const noteToUse = computed(() => (note.reblog ? note.reblog : note)); -const url = wrapUrl(`/@${noteToUse.account.acct}/${noteToUse.id}`); -const accountUrl = wrapUrl(`/@${noteToUse.account.acct}`); +const url = wrapUrl(`/@${noteToUse.value.account.acct}/${noteToUse.value.id}`); +const accountUrl = wrapUrl(`/@${noteToUse.value.account.acct}`); const reblogAccountUrl = wrapUrl(`/@${note.account.acct}`); -const isRemote = noteToUse.account.acct.includes("@"); +const isRemote = noteToUse.value.account.acct.includes("@");