From 9dbec0b9ee466a53105586a9ae821a8867c6896f Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Sun, 12 Apr 2026 22:30:48 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E5=90=8D=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=B6=A6=E8=89=B2+=E5=8E=BB=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=9B=B4=E6=8E=A5=E5=BC=B9=E6=94=B9=E5=90=8D?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/main.py | 4 ++-- frontend/src/components/UserMenu.vue | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/backend/main.py b/backend/main.py index 75a85ec..dc21392 100644 --- a/backend/main.py +++ b/backend/main.py @@ -2099,8 +2099,8 @@ def startup(): for u in all_users: conn.execute( "INSERT INTO notifications (target_role, title, body, target_user_id) VALUES (?, ?, ?, ?)", - ("viewer", "📢 用户名变更通知", - "系统已取消显示名称,统一使用用户名。你可以在个人设置中修改一次用户名。", u["id"]) + ("viewer", "📢 用户名更新提醒", + "为了统一体验,系统已将显示名称合并为用户名。你有一次修改用户名的机会,修改后将不可更改,请慎重选择。", u["id"]) ) conn.commit() print(f"[INIT] Synced display_name for {len(needs_sync)} users") diff --git a/frontend/src/components/UserMenu.vue b/frontend/src/components/UserMenu.vue index 4436293..ad9d090 100644 --- a/frontend/src/components/UserMenu.vue +++ b/frontend/src/components/UserMenu.vue @@ -41,6 +41,8 @@
+ + @@ -155,6 +157,15 @@ async function changeUsername() { } } +function isUsernameNotice(n) { + return n.title && n.title.includes('用户名更新') +} + +function goRename(n) { + markOneRead(n) + changeUsername() +} + function isPlanRequest(n) { return n.title && (n.title.includes('方案请求') || n.title.includes('方案需求')) }