From ddebe77e5b9f5de0070de713a33f66eec18299d0 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Sat, 11 May 2024 17:53:42 -1000 Subject: [PATCH] feat: :lipstick: Small UI tweaks --- components/avatars/Centered.vue | 3 +- components/social-elements/notes/header.vue | 37 ++++++++++++++++--- .../social-elements/notes/note-content.vue | 4 +- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/components/avatars/Centered.vue b/components/avatars/Centered.vue index 22c2938..a8f5857 100644 --- a/components/avatars/Centered.vue +++ b/components/avatars/Centered.vue @@ -1,7 +1,8 @@ diff --git a/components/social-elements/notes/header.vue b/components/social-elements/notes/header.vue index 1b71f36..4a25c37 100644 --- a/components/social-elements/notes/header.vue +++ b/components/social-elements/notes/header.vue @@ -33,17 +33,28 @@ note?.account.display_name }} - + {{ timeAgo }} - + - @{{ - note?.account.acct - }} + + @{{ + note?.account.acct + }} + + @@ -61,4 +72,20 @@ const props = defineProps<{ const noteUrl = props.note && `/@${props.note.account.acct}/${props.note.id}`; const accountUrl = props.note && `/@${props.note.account.acct}`; const timeAgo = useTimeAgo(props.note?.created_at ?? 0); +const fullTime = Intl.DateTimeFormat("default", { + dateStyle: "medium", + timeStyle: "short", +}).format(new Date(props.note?.created_at ?? 0)); +const hasCopied = ref(false); + +const { copy } = useClipboard(); +const copyAccount = () => { + if (props.note) { + copy(`@${props.note.account.acct}`); + hasCopied.value = true; + setTimeout(() => { + hasCopied.value = false; + }, 2000); + } +}; \ No newline at end of file diff --git a/components/social-elements/notes/note-content.vue b/components/social-elements/notes/note-content.vue index 4486bb1..beee338 100644 --- a/components/social-elements/notes/note-content.vue +++ b/components/social-elements/notes/note-content.vue @@ -1,6 +1,6 @@