diff --git a/ui/homepage/app/login/LoginContent.tsx b/ui/homepage/app/login/LoginContent.tsx index 683ed65..51b60e1 100644 --- a/ui/homepage/app/login/LoginContent.tsx +++ b/ui/homepage/app/login/LoginContent.tsx @@ -73,7 +73,10 @@ export default function LoginContent({ children }: LoginContentProps) { successMessages.push(alerts.registered) } if (setupMfaParam === '1') { - successMessages.push(alerts.mfa.setupRequired) + const setupRequiredMessage = alerts.mfa?.setupRequired ?? alerts.genericError + if (setupRequiredMessage) { + successMessages.push(setupRequiredMessage) + } } if (successMessages.length > 0) { diff --git a/ui/homepage/i18n/translations.ts b/ui/homepage/i18n/translations.ts index d4da591..f2cab8d 100644 --- a/ui/homepage/i18n/translations.ts +++ b/ui/homepage/i18n/translations.ts @@ -165,6 +165,7 @@ type AuthLoginTranslation = { passwordPlaceholder: string remember: string submit: string + submitting?: string mfa: { mode: string passwordOnly: string @@ -232,6 +233,12 @@ type UserCenterMfaTranslation = { subtitle: string pendingHint: string enabledHint: string + summary: { + description: string + statusLabel: string + manage: string + bind: string + } generate: string regenerate: string secretLabel: string @@ -267,6 +274,16 @@ type UserCenterMfaTranslation = { docsUrl: string setup: string } + modal: { + title: string + close: string + } + disable: { + title: string + description: string + action: string + confirming: string + } error: string } @@ -317,16 +334,17 @@ export type Translation = { title: string description: string usernameLabel: string - passwordLabel: string - submit: string - success: string - goHome: string - missingUsername: string - missingPassword: string - missingTotp?: string - invalidCredentials: string - userNotFound: string - genericError: string + passwordLabel: string + submit: string + success: string + goHome: string + missingUsername: string + missingPassword: string + missingTotp?: string + invalidCredentials: string + userNotFound: string + genericError: string + serviceUnavailable?: string disclaimer: string } termsTitle: string @@ -410,6 +428,7 @@ export const translations: Record<'en' | 'zh', Translation> = { invalidCredentials: 'Incorrect username or password. Please try again.', userNotFound: 'We could not find an account with that username.', genericError: 'We could not sign you in. Please try again later.', + serviceUnavailable: 'The account service is temporarily unavailable. Please try again shortly.', disclaimer: 'This demo login keeps your username in memory only to personalize navigation while you browse.', }, termsTitle: 'Terms of Service', @@ -774,6 +793,7 @@ export const translations: Record<'en' | 'zh', Translation> = { invalidCredentials: '用户名或密码不正确,请重试。', userNotFound: '未找到该用户名对应的账户。', genericError: '登录失败,请稍后再试。', + serviceUnavailable: '账户服务暂时不可用,请稍后再试。', disclaimer: '此演示登录仅会在浏览期间保留用户名,以便展示个性化的导航体验。', }, termsTitle: '服务条款', diff --git a/ui/homepage/next.config.js b/ui/homepage/next.config.js index 7ddd665..49216e9 100644 --- a/ui/homepage/next.config.js +++ b/ui/homepage/next.config.js @@ -50,7 +50,6 @@ const nextConfig = { reactStrictMode: true, compress: false, // 压缩交给 Nginx,省 Node CPU images: { unoptimized: true }, // 关闭服务端图片处理 - featureToggles, webpack(config) { config.module.rules.push({ test: /\.ya?ml$/i, @@ -66,11 +65,5 @@ const nextConfig = { }, ] }, - publicRuntimeConfig: { - featureToggles, - }, } - -nextConfig.isFeatureEnabled = isFeatureEnabled - module.exports = nextConfig