feat(account): predict relationship from context
This commit is contained in:
parent
b4cda4338f
commit
88731ee18d
6 changed files with 20 additions and 10 deletions
|
@ -8,6 +8,8 @@ definePageMeta({ name: 'account-followers' })
|
|||
const account = await fetchAccountByHandle(handle)
|
||||
const paginator = account ? useMasto().v1.accounts.listFollowers(account.id, {}) : null
|
||||
|
||||
const isSelf = useSelfAccount(account)
|
||||
|
||||
if (account) {
|
||||
useHeadFixed({
|
||||
title: () => `${t('account.followers')} | ${getDisplayName(account)} (@${account})`,
|
||||
|
@ -17,6 +19,6 @@ if (account) {
|
|||
|
||||
<template>
|
||||
<template v-if="paginator">
|
||||
<AccountPaginator :paginator="paginator" />
|
||||
<AccountPaginator :paginator="paginator" :relationship-context="isSelf ? 'followedBy' : undefined" />
|
||||
</template>
|
||||
</template>
|
||||
|
|
|
@ -8,6 +8,8 @@ definePageMeta({ name: 'account-following' })
|
|||
const account = await fetchAccountByHandle(handle)
|
||||
const paginator = account ? useMasto().v1.accounts.listFollowing(account.id, {}) : null
|
||||
|
||||
const isSelf = useSelfAccount(account)
|
||||
|
||||
if (account) {
|
||||
useHeadFixed({
|
||||
title: () => `${t('account.following')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||
|
@ -17,6 +19,6 @@ if (account) {
|
|||
|
||||
<template>
|
||||
<template v-if="paginator">
|
||||
<AccountPaginator :paginator="paginator" />
|
||||
<AccountPaginator :paginator="paginator" :relationship-context="isSelf ? 'following' : undefined" />
|
||||
</template>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue