From 88731ee18dbe25c80c7b1c03f55881ef27e87275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Tue, 10 Jan 2023 15:49:49 +0800 Subject: [PATCH] feat(account): predict relationship from context --- components/account/AccountCard.vue | 3 ++- components/account/AccountFollowButton.vue | 13 +++++++------ components/account/AccountPaginator.vue | 2 ++ composables/users.ts | 4 +++- pages/[[server]]/@[account]/index/followers.vue | 4 +++- pages/[[server]]/@[account]/index/following.vue | 4 +++- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/components/account/AccountCard.vue b/components/account/AccountCard.vue index 7fb5bac6..eae4f11e 100644 --- a/components/account/AccountCard.vue +++ b/components/account/AccountCard.vue @@ -4,6 +4,7 @@ import type { mastodon } from 'masto' const { account } = defineProps<{ account: mastodon.v1.Account hoverCard?: boolean + relationshipContext?: 'followedBy' | 'following' }>() cacheAccount(account) @@ -19,7 +20,7 @@ cacheAccount(account) :to="getAccountRoute(account)" />
- +
diff --git a/components/account/AccountFollowButton.vue b/components/account/AccountFollowButton.vue index bd073df5..6ee4bff3 100644 --- a/components/account/AccountFollowButton.vue +++ b/components/account/AccountFollowButton.vue @@ -1,9 +1,10 @@ @@ -11,6 +12,7 @@ const { paginator } = defineProps<{