From 074da4768edb9717f935280e1c589986fbc26bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 23 Nov 2022 16:37:31 +0800 Subject: [PATCH] refactor: improve status card UI (#28) --- components/account/AccountHeader.vue | 8 ++++---- components/status/StatusCard.vue | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index 25d76aec..b33a8834 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -46,19 +46,19 @@ const createdAt = $computed(() => {
-
+
-

+

Joined

-

+

{{ createdAt }}

-

+

{{ field.name }}

diff --git a/components/status/StatusCard.vue b/components/status/StatusCard.vue index 894f7479..6686c25c 100644 --- a/components/status/StatusCard.vue +++ b/components/status/StatusCard.vue @@ -24,8 +24,8 @@ const router = useRouter() function go(e: MouseEvent) { const path = e.composedPath() as HTMLElement[] - const el = path.find(el => ['A', 'BUTTON', 'P', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase())) - if (!el || el.tagName.toUpperCase() === 'P') + const el = path.find(el => ['A', 'BUTTON', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase())) + if (!el) router.push(`/@${status.account.acct}/${status.id}`) } @@ -63,7 +63,7 @@ const timeago = useTimeAgo(() => status.createdAt, {