summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/note.vue
diff options
context:
space:
mode:
authortaiy <53635909+taiyme@users.noreply.github.com>2024-02-16 16:17:09 +0900
committerGitHub <noreply@github.com>2024-02-16 16:17:09 +0900
commit860e8bb5d84c02276dba7631b30fcf06b434e98a (patch)
treed10966c19b91b52e447ba1d495eaf6fae276ace2 /packages/frontend/src/pages/note.vue
parentfix(ci): publish docker image fails (3) (#13327) (diff)
downloadmisskey-860e8bb5d84c02276dba7631b30fcf06b434e98a.tar.gz
misskey-860e8bb5d84c02276dba7631b30fcf06b434e98a.tar.bz2
misskey-860e8bb5d84c02276dba7631b30fcf06b434e98a.zip
fix(frontend/pageMetadata): ページタイトルが更新されない問題 (#13289)
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/pages/note.vue')
-rw-r--r--packages/frontend/src/pages/note.vue20
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue
index ae35be969f..4c985b96e6 100644
--- a/packages/frontend/src/pages/note.vue
+++ b/packages/frontend/src/pages/note.vue
@@ -141,16 +141,18 @@ const headerActions = computed(() => []);
const headerTabs = computed(() => []);
-definePageMetadata(computed(() => note.value ? {
+definePageMetadata(() => ({
title: i18n.ts.note,
- subtitle: dateString(note.value.createdAt),
- avatar: note.value.user,
- path: `/notes/${note.value.id}`,
- share: {
- title: i18n.tsx.noteOf({ user: note.value.user.name }),
- text: note.value.text,
- },
-} : null));
+ ...note.value ? {
+ subtitle: dateString(note.value.createdAt),
+ avatar: note.value.user,
+ path: `/notes/${note.value.id}`,
+ share: {
+ title: i18n.tsx.noteOf({ user: note.value.user.name }),
+ text: note.value.text,
+ },
+ } : {},
+}));
</script>
<style lang="scss" module>