From a67bee470e56bc4e8957f232d4645060e1badcc9 Mon Sep 17 00:00:00 2001 From: shenlan Date: Mon, 27 Oct 2025 12:33:26 +0800 Subject: [PATCH] refine mfa setup prompts (#592) --- dashboard/app/panel/components/Sidebar.tsx | 56 ++++++++++------ dashboard/i18n/translations.ts | 36 +++++----- .../user-center/account/MfaSetupPanel.tsx | 27 +++++--- .../user-center/components/UserOverview.tsx | 67 ++++++++++++------- 4 files changed, 112 insertions(+), 74 deletions(-) diff --git a/dashboard/app/panel/components/Sidebar.tsx b/dashboard/app/panel/components/Sidebar.tsx index ac03799..6e1c02b 100644 --- a/dashboard/app/panel/components/Sidebar.tsx +++ b/dashboard/app/panel/components/Sidebar.tsx @@ -87,6 +87,16 @@ export default function Sidebar({ className = '', onNavigate }: SidebarProps) { .filter((value): value is NavSection => Boolean(value)) }, [requiresSetup, user]) + const pendingHint = copy.pendingHint.trim() + const lockedMessage = copy.lockedMessage.trim() + const setupLabel = copy.actions.setup.trim() + const docsLabel = copy.actions.docs.trim() + const hasBannerContent = + pendingHint.length > 0 || + lockedMessage.length > 0 || + setupLabel.length > 0 || + docsLabel.length > 0 + return (