From f5969736033278297debda6eb047e77bb84d1ad7 Mon Sep 17 00:00:00 2001 From: patak Date: Wed, 23 Nov 2022 23:40:35 +0100 Subject: [PATCH] refactor: getAccountHandle, getAccountPath, getStatusPath --- components/account/AccountHeader.vue | 10 +++++----- components/account/AccountInfo.vue | 6 +++--- components/account/AccountInlineInfo.vue | 2 +- components/account/AccountLink.vue | 2 +- components/status/StatusActions.vue | 2 +- components/status/StatusCard.vue | 2 +- components/user/UserSwitcher.vue | 2 +- composables/masto.ts | 14 +++++++++++++- 8 files changed, 26 insertions(+), 14 deletions(-) diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index f52fcc10..e35cf2fe 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -20,14 +20,14 @@ const createdAt = $computed(() => {
- +

- @{{ account.acct }} + {{ getAccountHandle(account) }}

@@ -65,13 +65,13 @@ const createdAt = $computed(() => {
- + {{ account.statusesCount }} Posts - + {{ account.followingCount }} Following - + {{ account.followersCount }} Followers
diff --git a/components/account/AccountInfo.vue b/components/account/AccountInfo.vue index f7a32c9f..6b87b01f 100644 --- a/components/account/AccountInfo.vue +++ b/components/account/AccountInfo.vue @@ -7,17 +7,17 @@ const { account, link = true, fullServer = false } = defineProps<{ fullServer?: boolean }>() -const id = computed(() => fullServer && !account.acct.includes('@') ? `@${account.acct}@${account.url.match(UserLinkRE)?.[1]}` : `@${account.acct}`) +const id = computed(() => fullServer && !account.acct.includes('@') ? `@${account.acct}@${account.url.match(UserLinkRE)?.[1]}` : getAccountHandle(account))