From f33b6b58cda7160ddcb7905921e6ad0ce84ef808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Mon, 5 Dec 2022 00:50:38 +0800 Subject: [PATCH] feat: hide profile when blocked --- locales/en-US.json | 1 + locales/zh-CN.json | 1 + pages/@[account]/index.vue | 12 +++++++++++- pages/@[account]/index/index.vue | 4 ---- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/locales/en-US.json b/locales/en-US.json index c1a8c4bf..80946705 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -1,6 +1,7 @@ { "account": { "avatar_description": "{0}'s avatar", + "blocked_by": "You're blocked by this user.", "blocked_domains": "Blocked domains", "blocked_users": "Blocked users", "favourites": "Favourites", diff --git a/locales/zh-CN.json b/locales/zh-CN.json index cca82a39..d6d163fa 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -1,6 +1,7 @@ { "account": { "avatar_description": "{0}的头像", + "blocked_by": "您已被此用户拉黑", "blocked_domains": "已拉黑的域名", "blocked_users": "已拉黑的用户", "favourites": "喜欢的帖文", diff --git a/pages/@[account]/index.vue b/pages/@[account]/index.vue index 4f06d903..42a80bc6 100644 --- a/pages/@[account]/index.vue +++ b/pages/@[account]/index.vue @@ -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(() => { diff --git a/pages/@[account]/index/index.vue b/pages/@[account]/index/index.vue index 75a99640..b09a6b58 100644 --- a/pages/@[account]/index/index.vue +++ b/pages/@[account]/index/index.vue @@ -43,10 +43,6 @@ const paginator = $computed(() => tabs.find(t => t.name === tab)!.paginator)