feat: hide profile when blocked
This commit is contained in:
parent
1476438d73
commit
f33b6b58cd
4 changed files with 13 additions and 5 deletions
|
@ -5,6 +5,7 @@ const accountName = $(computedEager(() => toShortHandle(params.account as string
|
|||
const { t } = useI18n()
|
||||
|
||||
const { data: account, refresh } = $(await useAsyncData(() => fetchAccountByHandle(accountName).catch(() => null)))
|
||||
const relationship = $computed(() => account ? useRelationship(account).value : undefined)
|
||||
|
||||
if (account) {
|
||||
useHeadFixed({
|
||||
|
@ -27,7 +28,16 @@ onReactivated(() => {
|
|||
|
||||
<template v-if="account">
|
||||
<AccountHeader :account="account" command border="b base" />
|
||||
<NuxtPage />
|
||||
|
||||
<div v-if="relationship?.blockedBy" h-30 flex="~ col center gap-2">
|
||||
<div text-secondary>
|
||||
{{ $t('account.profile_unavailable') }}
|
||||
</div>
|
||||
<div text-secondary-light text-sm>
|
||||
{{ $t('account.blocked_by') }}
|
||||
</div>
|
||||
</div>
|
||||
<NuxtPage v-else />
|
||||
</template>
|
||||
|
||||
<CommonNotFound v-else>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue