From dfd8b8968ae9d39af8f63046cfef814243d2849f Mon Sep 17 00:00:00 2001 From: Alex <49969959+alexzhang1030@users.noreply.github.com> Date: Wed, 21 Dec 2022 15:46:36 +0800 Subject: [PATCH] feat: improve status detail page title (#485) --- components/status/StatusDetails.vue | 6 ++++++ composables/utils.ts | 5 +++++ locales/en-US.json | 1 + locales/zh-CN.json | 3 ++- pages/[[server]]/@[account]/index/following.vue | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/components/status/StatusDetails.vue b/components/status/StatusDetails.vue index 2b3e0290..e2fa752d 100644 --- a/components/status/StatusDetails.vue +++ b/components/status/StatusDetails.vue @@ -15,6 +15,12 @@ const status = $computed(() => { const createdAt = useFormattedDateTime(status.createdAt) const visibility = $computed(() => STATUS_VISIBILITIES.find(v => v.value === status.visibility)!) + +const { t } = useI18n() + +useHeadFixed({ + title: () => `${status.account.displayName || status.account.acct} ${t('common.in')} ${t('app_name')}: "${removeHTMLTags(status.content) || ''}"`, +})