From 258fdf24656f6fda03f284b9079bac0c71a1283b Mon Sep 17 00:00:00 2001 From: mapxn <16299874+mapxn@users.noreply.github.com> Date: Sat, 24 Oct 2026 08:58:20 +0800 Subject: [PATCH] feat(web): migrate 11 pages to Stage 2 design tokens (ONE-88 Stage 3) - Page headers adopt text-h1/bold/tracking-tight with muted subtitles (new i18n keys: links.titleDesc, analytics.titleDesc, settings.titleDesc, admin.{usersDesc,allLinksDesc,globalSettingsDesc}) - Typography ladder: text-sm/xs/2xl -> text-body/caption/micro/h*; CardTitle/CardDescription own the heading ladder (drop text-base overrides) - Whitespace: page containers -> space-y-6 rhythm; loading/empty states py-12 -> py-16; label->input gap space-y-1 -> space-y-2 - Tables: caption + tracking-caps uppercase headers, micro seq column, numeric click counts in font-mono semibold tabular-nums, tokenized hover transitions, rounded-lg card-backed containers - Analytics: charts use hsl(var(--chart-*)) tokens (dark-theme aware) instead of hardcoded hex; stat cards get caption/caps labels and h1 mono values - Raw selects restyled to match Input (h-10, shadow-xs, focus ring) - TwoFactor tabs and toggle chips use token durations/easings - dialog.tsx/card.tsx whitespace-only biome formatting fixes --- apps/web/src/components/setup-migrations.tsx | 10 +- apps/web/src/components/ui/card.tsx | 10 +- apps/web/src/components/ui/dialog.tsx | 5 +- apps/web/src/i18n/locales/en.ts | 6 + apps/web/src/i18n/locales/zh-CN.ts | 6 + apps/web/src/pages/SetupPage.tsx | 22 ++-- apps/web/src/pages/admin/AdminLinksPage.tsx | 51 +++++---- .../web/src/pages/admin/AdminSettingsPage.tsx | 81 +++++++------- apps/web/src/pages/admin/AdminUsersPage.tsx | 67 +++++------ .../web/src/pages/auth/ForgotPasswordPage.tsx | 30 ++--- apps/web/src/pages/auth/LoginPage.tsx | 12 +- apps/web/src/pages/auth/RegisterPage.tsx | 32 +++--- apps/web/src/pages/auth/TwoFactorPage.tsx | 8 +- .../web/src/pages/dashboard/AnalyticsPage.tsx | 104 +++++++++--------- apps/web/src/pages/dashboard/LinksPage.tsx | 75 +++++++------ apps/web/src/pages/dashboard/SettingsPage.tsx | 67 +++++------ 16 files changed, 315 insertions(+), 271 deletions(-) diff --git a/apps/web/src/components/setup-migrations.tsx b/apps/web/src/components/setup-migrations.tsx index 52079bb..e4305db 100644 --- a/apps/web/src/components/setup-migrations.tsx +++ b/apps/web/src/components/setup-migrations.tsx @@ -16,7 +16,9 @@ export function SetupMigrationsResult({ if (migrations.length === 0) { return ( -

{t('setup.noMigrations')}

+

+ {t('setup.noMigrations')} +

); } @@ -25,13 +27,15 @@ export function SetupMigrationsResult({ {migrations.map((m) => (
  • - {m.name} + {m.name} {t(migrationStatusLabel(m.status))}
    {m.status === 'error' && m.error && ( -

    {m.error}

    +

    + {m.error} +

    )}
  • ))} diff --git a/apps/web/src/components/ui/card.tsx b/apps/web/src/components/ui/card.tsx index 3ba0b66..95be0b7 100644 --- a/apps/web/src/components/ui/card.tsx +++ b/apps/web/src/components/ui/card.tsx @@ -34,10 +34,7 @@ export function CardTitle({ }: React.HTMLAttributes) { return (

    ); @@ -48,7 +45,10 @@ export function CardDescription({ ...props }: React.HTMLAttributes) { return ( -

    +

    ); } diff --git a/apps/web/src/components/ui/dialog.tsx b/apps/web/src/components/ui/dialog.tsx index c472d0c..5f728c8 100644 --- a/apps/web/src/components/ui/dialog.tsx +++ b/apps/web/src/components/ui/dialog.tsx @@ -52,7 +52,10 @@ export function DialogTitle({ ...props }: React.HTMLAttributes) { return ( -

    +

    ); } diff --git a/apps/web/src/i18n/locales/en.ts b/apps/web/src/i18n/locales/en.ts index 976d029..6cbb3cd 100644 --- a/apps/web/src/i18n/locales/en.ts +++ b/apps/web/src/i18n/locales/en.ts @@ -86,6 +86,7 @@ export const en = { }, links: { title: 'My Links', + titleDesc: 'Create and manage your short links.', createLink: 'Create Link', shortLink: 'Short Link', destination: 'Destination', @@ -115,6 +116,7 @@ export const en = { }, analytics: { title: 'Analytics', + titleDesc: 'Traffic insights for your links.', linkSearchPlaceholder: 'Search by slug...', allLinks: 'All Links', selectLink: 'Select a link to view its analytics', @@ -137,6 +139,7 @@ export const en = { }, settings: { title: 'Account Settings', + titleDesc: 'Manage your preferences and sign-in security.', changePassword: 'Change Password', currentPassword: 'Current Password', newPassword: 'New Password', @@ -209,8 +212,11 @@ export const en = { admin: { adminPanel: 'Admin Panel', users: 'Users', + usersDesc: 'Manage accounts, roles and access.', allLinks: 'All Links', + allLinksDesc: 'Every short link across all users.', globalSettings: 'Global Settings', + globalSettingsDesc: 'Instance-wide configuration.', createUser: 'Create User', createUserTitle: 'Create New User', createUserDesc: 'Create a new user account', diff --git a/apps/web/src/i18n/locales/zh-CN.ts b/apps/web/src/i18n/locales/zh-CN.ts index 8635191..09459b7 100644 --- a/apps/web/src/i18n/locales/zh-CN.ts +++ b/apps/web/src/i18n/locales/zh-CN.ts @@ -84,6 +84,7 @@ export const zhCN: Translations = { }, links: { title: '我的链接', + titleDesc: '创建并管理你的短链接。', createLink: '创建链接', shortLink: '短链接', destination: '目标地址', @@ -112,6 +113,7 @@ export const zhCN: Translations = { }, analytics: { title: '统计分析', + titleDesc: '查看你的链接流量洞察。', linkSearchPlaceholder: '按别名搜索...', allLinks: '所有链接', selectLink: '选择链接查看其统计数据', @@ -134,6 +136,7 @@ export const zhCN: Translations = { }, settings: { title: '账户设置', + titleDesc: '管理偏好设置与登录安全。', changePassword: '修改密码', currentPassword: '当前密码', newPassword: '新密码', @@ -202,8 +205,11 @@ export const zhCN: Translations = { admin: { adminPanel: '管理面板', users: '用户', + usersDesc: '管理账户、角色与访问权限。', allLinks: '所有链接', + allLinksDesc: '全站所有用户的短链接。', globalSettings: '全局设置', + globalSettingsDesc: '实例级配置。', createUser: '创建用户', createUserTitle: '创建新用户', createUserDesc: '创建一个新的用户账户', diff --git a/apps/web/src/pages/SetupPage.tsx b/apps/web/src/pages/SetupPage.tsx index 90504cf..b7cec64 100644 --- a/apps/web/src/pages/SetupPage.tsx +++ b/apps/web/src/pages/SetupPage.tsx @@ -61,26 +61,28 @@ export default function SetupPage() { return ( - {t('setup.title')} + {t('setup.title')} {t('setup.titleDesc')} {stateLoading ? ( -

    {t('common.loading')}

    +

    + {t('common.loading')} +

    ) : stateError ? ( -

    +

    {formatSetupError(stateError, t)}

    ) : !enabled ? ( -
    -

    {t('setup.disabledTitle')}

    -

    +

    +

    {t('setup.disabledTitle')}

    +

    {t('setup.disabledDesc')}

    ) : (
    -
    +
    +

    {formatSetupError(runError, t)}

    )} {result && (
    -

    {t('setup.migrationsTitle')}

    +

    + {t('setup.migrationsTitle')} +

    )} diff --git a/apps/web/src/pages/admin/AdminLinksPage.tsx b/apps/web/src/pages/admin/AdminLinksPage.tsx index 8e4c058..4dac478 100644 --- a/apps/web/src/pages/admin/AdminLinksPage.tsx +++ b/apps/web/src/pages/admin/AdminLinksPage.tsx @@ -47,10 +47,17 @@ export default function AdminLinksPage() { }); return ( -
    -

    {t('admin.allLinks')}

    -
    - +
    +
    +

    + {t('admin.allLinks')} +

    +

    + {t('admin.allLinksDesc')} +

    +
    +
    + {isLoading ? ( -
    +
    {t('common.loading')}
    ) : ( -
    - +
    +
    - - + - - - - - - - @@ -102,9 +111,9 @@ export default function AdminLinksPage() { {data?.links.map((link) => ( - @@ -112,7 +121,7 @@ export default function AdminLinksPage() { - @@ -136,8 +145,8 @@ export default function AdminLinksPage() { )} {data && data.pagination.pages > 1 && ( -
    - +
    + {t('admin.totalLinks', { count: data.pagination.total })}
    diff --git a/apps/web/src/pages/admin/AdminSettingsPage.tsx b/apps/web/src/pages/admin/AdminSettingsPage.tsx index 7add242..dc9dfa6 100644 --- a/apps/web/src/pages/admin/AdminSettingsPage.tsx +++ b/apps/web/src/pages/admin/AdminSettingsPage.tsx @@ -233,15 +233,20 @@ export default function AdminSettingsPage() { ); return ( -
    -

    {t('admin.globalSettings')}

    +
    +
    +

    + {t('admin.globalSettings')} +

    +

    + {t('admin.globalSettingsDesc')} +

    +
    {/* Registration toggle */} - - {t('admin.registrationToggle')} - + {t('admin.registrationToggle')} {t('admin.registrationDesc')} @@ -264,9 +269,7 @@ export default function AdminSettingsPage() { {/* Email verification toggle */} - - {t('admin.emailVerificationToggle')} - + {t('admin.emailVerificationToggle')} {t('admin.emailVerificationDesc')} @@ -291,7 +294,7 @@ export default function AdminSettingsPage() { {/* App name */} - {t('admin.appName')} + {t('admin.appName')} {t('admin.appNameDesc')} @@ -313,14 +316,12 @@ export default function AdminSettingsPage() { {/* Email provider */} - - {t('admin.emailProvider')} - + {t('admin.emailProvider')} {t('admin.emailProviderDesc')} -
    +
    {resendKeyIsSet && ( -

    +

    An API key is configured. Leave blank to keep it unchanged.

    )} -

    +

    Get your API key from{' '} . Stored in the database; alternatively set the{' '} - RESEND_API_KEY Worker - secret. + + RESEND_API_KEY + {' '} + Worker secret.

    -
    +
    -
    +
    setEmailFromDomain(e.target.value)} placeholder="example.com" /> -

    +

    Emails will be sent from{' '} - noreply@<domain>. The - domain must be verified in your Resend account. + + noreply@<domain> + + . The domain must be verified in your Resend account.

    @@ -406,7 +411,7 @@ export default function AdminSettingsPage() { {emailProvider === 'smtp' && (
    -
    +
    -
    +
    -
    +
    -
    +
    -
    +
    -

    +

    {smtpPassIsSet ? 'A password is configured. Leave blank to keep it unchanged.' : 'Credentials are stored in the database.'} @@ -480,7 +485,7 @@ export default function AdminSettingsPage() { {/* Send test email (uses the saved settings) */}

    -
    +
    @@ -493,7 +498,7 @@ export default function AdminSettingsPage() { className="max-w-xs" />
    -

    +

    {t('admin.testEmailNote')}

    {runSetupError && ( -

    +

    {formatSetupError(runSetupError, t)}

    )} {runSetupResult && (
    -

    +

    {t('setup.migrationsTitle')}

    diff --git a/apps/web/src/pages/admin/AdminUsersPage.tsx b/apps/web/src/pages/admin/AdminUsersPage.tsx index 167dcd8..4e52f8e 100644 --- a/apps/web/src/pages/admin/AdminUsersPage.tsx +++ b/apps/web/src/pages/admin/AdminUsersPage.tsx @@ -77,16 +77,23 @@ export default function AdminUsersPage() { id === updatePendingId || id === deletePendingId; return ( -
    -
    -

    {t('admin.users')}

    +
    +
    +
    +

    + {t('admin.users')} +

    +

    + {t('admin.usersDesc')} +

    +
    -
    - +
    + {isLoading ? ( -
    +
    {t('common.loading')}
    ) : ( -
    -
    # + + # + {t('links.shortLink')} + {t('links.destination')} + {t('common.user')} + {t('links.clicks')} + {t('links.expiry')} + {t('common.status')} + {t('common.created')} + {t('common.actions')}
    + {link.seq} {link.user_username} + {link.click_count ?? 0}
    +
    +
    - - - - - - @@ -131,11 +138,11 @@ export default function AdminUsersPage() { {data?.users.map((u) => ( @@ -149,7 +156,7 @@ export default function AdminUsersPage() { payload: { role: e.target.value as 'admin' | 'user' }, }) } - className="text-sm border rounded px-2 py-1 bg-background" + className="flex h-9 rounded-md border border-input bg-background px-2 text-body shadow-xs transition-colors duration-(--duration-fast) ease-(--ease-out) focus-visible:outline-none focus-visible:shadow-(--shadow-focus) disabled:opacity-50" > @@ -158,19 +165,13 @@ export default function AdminUsersPage() { @@ -219,8 +220,8 @@ export default function AdminUsersPage() { )} {data && data.pagination.pages > 1 && ( -
    - +
    + {t('admin.totalUsers', { count: data.pagination.total })}
    @@ -311,7 +312,7 @@ function CreateUserDialog({ {t('admin.createUserDesc')} -
    +
    -
    +
    -
    +
    -
    +
    -

    +

    {t('auth.passwordHint')}

    -
    +
    - - {t('auth.forgotPasswordTitle')} - + {t('auth.forgotPasswordTitle')} {t('auth.resetCodeSentTo', { email })} -

    +

    {t('auth.codeValidFor')}

    -
    +
    -

    +

    -

    +

    {t('auth.backToLogin')} @@ -175,14 +171,12 @@ export default function ForgotPasswordPage() { return ( - - {t('auth.forgotPasswordTitle')} - + {t('auth.forgotPasswordTitle')} {t('auth.forgotPasswordDesc')}
    -

    +
    -

    +

    {t('auth.backToLogin')} diff --git a/apps/web/src/pages/auth/LoginPage.tsx b/apps/web/src/pages/auth/LoginPage.tsx index 47206b8..99d8833 100644 --- a/apps/web/src/pages/auth/LoginPage.tsx +++ b/apps/web/src/pages/auth/LoginPage.tsx @@ -56,12 +56,12 @@ export default function LoginPage() { return ( - {t('auth.signIn')} + {t('auth.signIn')} {t('auth.signInDesc')}
    -

    +
    -
    +
    {t('auth.forgotPassword')} @@ -100,7 +100,7 @@ export default function LoginPage() { the register link. */} {configLoadFailed && (

    {t('auth.configLoadFailed')}{' '} @@ -114,7 +114,7 @@ export default function LoginPage() {

    )} {registrationEnabled && ( -

    +

    {t('auth.noAccount')}{' '} {t('auth.register')} diff --git a/apps/web/src/pages/auth/RegisterPage.tsx b/apps/web/src/pages/auth/RegisterPage.tsx index 4fc8534..1981051 100644 --- a/apps/web/src/pages/auth/RegisterPage.tsx +++ b/apps/web/src/pages/auth/RegisterPage.tsx @@ -115,16 +115,16 @@ export default function RegisterPage() { return ( - {t('auth.createAccount')} + {t('auth.createAccount')} {configLoading ? ( -

    +

    {t('common.loading')}

    ) : (
    -

    +

    {t('auth.configLoadFailed')}

    )} -

    +

    {t('auth.backToLogin')} @@ -151,19 +151,17 @@ export default function RegisterPage() { return ( - - {t('auth.verifyEmailTitle')} - + {t('auth.verifyEmailTitle')} {t('auth.verifyEmailDesc', { email })} -

    +

    {t('auth.codeValidFor')}

    -
    +
    @@ -176,14 +174,14 @@ export default function RegisterPage() { {t('auth.verify')} -

    +

    -

    +

    {t('auth.backToLogin')} @@ -196,12 +194,12 @@ export default function RegisterPage() { return ( - {t('auth.createAccount')} + {t('auth.createAccount')} {t('auth.createAccountDesc')}
    -

    +
    -
    +
    -
    +
    -

    +

    {t('auth.passwordHint')}

    @@ -244,7 +242,7 @@ export default function RegisterPage() { {t('auth.createAccount')} -

    +

    {t('auth.alreadyAccount')}{' '} {t('auth.signInLink')} diff --git a/apps/web/src/pages/auth/TwoFactorPage.tsx b/apps/web/src/pages/auth/TwoFactorPage.tsx index 75bee6b..c24f41c 100644 --- a/apps/web/src/pages/auth/TwoFactorPage.tsx +++ b/apps/web/src/pages/auth/TwoFactorPage.tsx @@ -150,7 +150,7 @@ export default function TwoFactorPage() { setCode(''); setOtpSent(false); }} - className={`px-3 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ${ + className={`px-3 py-2 text-body font-medium border-b-2 -mb-px transition-colors duration-(--duration-normal) ease-(--ease-in-out) ${ tab === t_ ? 'border-primary text-primary' : 'border-transparent text-muted-foreground hover:text-foreground' @@ -164,7 +164,7 @@ export default function TwoFactorPage() { {tab === 'totp' && (
    -

    +
    ) : ( -
    +
    @@ -230,7 +230,7 @@ export default function TwoFactorPage() { {tab === 'passkey' && (
    -

    +

    {t('auth.passkeyDesc')}

    )} {showDropdown && ( -
    +
    {searchResults?.links.map((link) => ( @@ -203,12 +209,12 @@ export default function AnalyticsPage() { {/* Header: show which mode we're in */} {!selectedLinkId && ( -

    +

    {t('analytics.allLinksStats')}

    )} {selectedLinkId && selectedLinkData?.link && ( -
    +
    {selectedLinkData.link.slug} @@ -230,12 +236,14 @@ export default function AnalyticsPage() { )} {isLoading && ( -
    +
    {t('common.loading')}
    )} {error && ( -
    {t('analytics.failedToLoad')}
    +

    + {t('analytics.failedToLoad')} +

    )} {stats && ( @@ -264,16 +272,14 @@ export default function AnalyticsPage() { {!selectedLinkId && stats.topLinks && stats.topLinks.length > 0 && ( - - {t('analytics.topLinks')} - + {t('analytics.topLinks')}
    {stats.topLinks.map((l) => (
    - + {l.clicks} {t('analytics.clicks')}
    @@ -295,9 +301,7 @@ export default function AnalyticsPage() { {/* Timeline */} - - {t('analytics.clicksOverTime')} - + {t('analytics.clicksOverTime')} @@ -312,7 +316,7 @@ export default function AnalyticsPage() { @@ -325,9 +329,7 @@ export default function AnalyticsPage() {
    - - {t('analytics.devices')} - + {t('analytics.devices')} @@ -361,23 +363,23 @@ export default function AnalyticsPage() { - - {t('analytics.topCountries')} - + {t('analytics.topCountries')}
    {stats.countries.slice(0, 8).map((c) => (
    {c.country} - {c.clicks} + + {c.clicks} +
    ))} {stats.countries.length === 0 && ( -

    +

    {t('analytics.noData')}

    )} @@ -390,19 +392,19 @@ export default function AnalyticsPage() {
    - - {t('analytics.browsers')} - + {t('analytics.browsers')}
    {stats.browsers.map((b) => (
    {b.browser} - {b.clicks} + + {b.clicks} +
    ))}
    @@ -410,27 +412,25 @@ export default function AnalyticsPage() {
    - - {t('analytics.topReferrers')} - + {t('analytics.topReferrers')}
    {stats.referrers.slice(0, 8).map((r) => (
    {r.referer} - + {r.clicks}
    ))} {stats.referrers.length === 0 && ( -

    +

    {t('analytics.noReferrer')}

    )} @@ -442,9 +442,9 @@ export default function AnalyticsPage() { )} {!stats && !isLoading && !error && ( -
    +
    -

    {t('analytics.selectLink')}

    +

    {t('analytics.selectLink')}

    )}
    @@ -455,8 +455,12 @@ function StatCard({ title, value }: { title: string; value: string | number }) { return ( -

    {title}

    -

    {value}

    +

    + {title} +

    +

    + {value} +

    ); diff --git a/apps/web/src/pages/dashboard/LinksPage.tsx b/apps/web/src/pages/dashboard/LinksPage.tsx index 298e2ea..6ff3801 100644 --- a/apps/web/src/pages/dashboard/LinksPage.tsx +++ b/apps/web/src/pages/dashboard/LinksPage.tsx @@ -62,17 +62,24 @@ export default function LinksPage() { }); return ( -
    -
    -

    {t('links.title')}

    +
    +
    +
    +

    + {t('links.title')} +

    +

    + {t('links.titleDesc')} +

    +
    -
    - +
    + {isLoading ? ( -
    +
    {t('common.loading')}
    ) : !data?.links.length ? ( -
    +
    {t('links.noLinks')}
    ) : ( -
    -
    + {t('common.user')} + {t('admin.role')} + {t('admin.twoFA')} + {t('common.status')} + {t('admin.joined')} + {t('common.actions')}
    {u.username}
    -
    +
    {u.email}
    {u.totp_enabled ? ( - - TOTP - + TOTP ) : null} {u.passkey_enabled ? ( - - Passkey - + Passkey ) : null} {u.email_2fa_enabled ? ( - - Email - + Email ) : null}
    +
    +
    - - + - - - - - - @@ -125,14 +134,14 @@ export default function LinksPage() { {data.links.map((link) => ( - - @@ -156,8 +165,8 @@ export default function LinksPage() { )} {data && data.pagination.pages > 1 && ( -
    - +
    + {t('links.totalLinks', { count: data.pagination.total })}
    @@ -269,7 +278,7 @@ function CreateLinkDialog({ {t('links.createTitle')} -
    +
    -
    +
    -
    +
    setExpiryOption(opt)} - className={`px-3 py-1 rounded-md text-sm border transition-colors ${ + className={`rounded-md border px-3 py-1 text-caption transition-colors duration-(--duration-fast) ease-(--ease-out) ${ expiryOption === opt - ? 'bg-primary text-primary-foreground border-primary' - : 'border-input hover:bg-accent' + ? 'border-primary bg-primary text-primary-foreground' + : 'border-input hover:bg-accent hover:text-accent-foreground' }`} > {opt === 'never' @@ -412,7 +421,7 @@ export function EditLinkDialog({ {t('links.editTitle')} -
    +
    -
    +
    -
    +
    -
    +
    setForm((f) => ({ ...f, isActive: e.target.checked })) } - className="h-4 w-4" + className="h-4 w-4 accent-primary" />
    diff --git a/apps/web/src/pages/dashboard/SettingsPage.tsx b/apps/web/src/pages/dashboard/SettingsPage.tsx index 63ef760..8dca0bf 100644 --- a/apps/web/src/pages/dashboard/SettingsPage.tsx +++ b/apps/web/src/pages/dashboard/SettingsPage.tsx @@ -39,8 +39,15 @@ export default function SettingsPage() { const { t } = useTranslation(); return ( -
    -

    {t('settings.title')}

    +
    +
    +

    + {t('settings.title')} +

    +

    + {t('settings.titleDesc')} +

    +
    @@ -70,7 +77,7 @@ function PreferencesCard() { return ( - {t('settings.preferences')} + {t('settings.preferences')}
    @@ -81,10 +88,10 @@ function PreferencesCard() { key={value} type="button" onClick={() => setLang(value)} - className={`px-3 py-1.5 rounded-md text-sm border transition-colors ${ + className={`rounded-md border px-3 py-1.5 text-body transition-colors duration-(--duration-fast) ease-(--ease-out) ${ lang === value - ? 'bg-primary text-primary-foreground border-primary' - : 'border-input hover:bg-accent' + ? 'border-primary bg-primary text-primary-foreground' + : 'border-input hover:bg-accent hover:text-accent-foreground' }`} > {label} @@ -100,10 +107,10 @@ function PreferencesCard() { key={value} type="button" onClick={() => setTheme(value)} - className={`px-3 py-1.5 rounded-md text-sm border transition-colors ${ + className={`rounded-md border px-3 py-1.5 text-body transition-colors duration-(--duration-fast) ease-(--ease-out) ${ theme === value - ? 'bg-primary text-primary-foreground border-primary' - : 'border-input hover:bg-accent' + ? 'border-primary bg-primary text-primary-foreground' + : 'border-input hover:bg-accent hover:text-accent-foreground' }`} > {label} @@ -148,13 +155,11 @@ function ChangePasswordCard() { return ( - - {t('settings.changePassword')} - + {t('settings.changePassword')} -
    +
    -
    +
    -
    +
    - - {t('settings.totp')} + + {t('settings.totp')}
    {enabled ? t('settings.enabled') : t('settings.disabled')} @@ -327,10 +332,10 @@ function TotpCard({ {backupCodes.length > 0 ? (
    -

    +

    {t('settings.totpEnabled')}

    -
    +
    {backupCodes.map((c) => (
    {c}
    ))} @@ -347,7 +352,7 @@ function TotpCard({
    ) : setupData ? (
    -

    +

    {t('settings.scanQrCode')}

    @@ -359,12 +364,12 @@ function TotpCard({ height={200} /> ) : ( -

    +

    {setupData.uri}

    )}
    -

    +

    {t('settings.manualSecret')}{' '} {setupData.secret}

    @@ -487,8 +492,8 @@ function PasskeyCard({ onUpdate }: { onUpdate: () => Promise }) {
    - - {t('settings.passkeys')} + + {t('settings.passkeys')}
    {t('settings.passkeysDesc')}
    @@ -496,13 +501,13 @@ function PasskeyCard({ onUpdate }: { onUpdate: () => Promise }) { {data?.passkeys.map((pk) => (

    {pk.name ?? t('settings.unnamedKey')}

    -

    +

    {t('settings.added', { date: formatDate(pk.created_at) })}

    @@ -656,10 +661,8 @@ function EmailOtpCard({
    - - - {t('settings.emailOtp')} - + + {t('settings.emailOtp')}
    {enabled ? t('settings.enabled') : t('settings.disabled')} @@ -700,7 +703,7 @@ function EmailOtpCard({ {!codeSent ? (
    -

    +

    {t('settings.emailOtpVerifyNote')}

    @@ -720,7 +723,7 @@ function EmailOtpCard({ autoFocus placeholder={t('auth.sixDigitFromEmail')} /> -

    +

    # + + # + {t('links.shortLink')} + {t('links.destination')} + {t('links.clicks')} + {t('links.expiry')} + {t('common.status')} + {t('common.created')} + {t('common.actions')}
    + {link.user_seq} + {link.click_count ?? 0}