From 403d6eaa0ea9e02fd32b8fe2b0cc4e97fcc104b3 Mon Sep 17 00:00:00 2001 From: skytek_xinliang Date: Mon, 31 Aug 2026 14:27:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=80=A7=E5=88=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/citizen-frontend/src/pages/index.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/citizen-frontend/src/pages/index.vue b/app/citizen-frontend/src/pages/index.vue index 4206fd8..b63ef19 100644 --- a/app/citizen-frontend/src/pages/index.vue +++ b/app/citizen-frontend/src/pages/index.vue @@ -7,7 +7,7 @@ - {{ store.userProfile.name || "市民" }} 先生 + {{ displayUserName }} 資料更新於 {{ todayTimeString }} @@ -291,6 +291,19 @@ const courseStore = useCourseStore(); const router = useRouter(); const missingGroupDialog = ref(false); +const displayUserName = computed(() => { + const name = store.userProfile.name || "市民"; + const gender = store.userProfile.gender; + const honorific = + gender === "男" || gender === "male" + ? "先生" + : gender === "女" || gender === "female" + ? "女士" + : ""; + + return honorific ? `${name} ${honorific}` : name; +}); + const MISSING_GROUP_DIALOG_KEY = "missing-fitness-group-dialog-shown"; function hasShownMissingGroupDialog() {