From 7862757da7a480d87fbfe4af90ed2ee7c8fbb249 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Sun, 1 Dec 2024 18:54:17 +0100 Subject: [PATCH] feat: :sparkles: Reimplement like, reblog and delete functionality --- components/notes/actions.vue | 45 ++++++++++++++++++++++++++++++++---- components/notes/menu.vue | 35 ++++++++++++++++++++++++---- components/notes/note.vue | 10 ++++---- 3 files changed, 76 insertions(+), 14 deletions(-) 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) }} - - - + @@ -25,26 +25,63 @@ @@ -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("@");