diff --git a/web-next/app/[locale]/account/page.tsx b/web-next/app/[locale]/account/page.tsx index b76326d..d3454b6 100644 --- a/web-next/app/[locale]/account/page.tsx +++ b/web-next/app/[locale]/account/page.tsx @@ -1,5 +1,5 @@ import { getTranslations, setRequestLocale } from 'next-intl/server' -import { redirect } from '@/i18n/navigation' +import { redirect, Link } from '@/i18n/navigation' import { getSession } from '@/lib/session' import { getAccountDashboard, getAccountRank } from '@/lib/account' import { isAdmin } from '@/lib/admin' @@ -8,6 +8,15 @@ import { AccountTools } from '@/components/AccountTools' export const dynamic = 'force-dynamic' +// Enmascara el correo: muestra los primeros caracteres del usuario y el dominio. +function maskEmail(e: string): string { + if (!e) return '' + const [local, domain] = e.split('@') + if (!domain) return e + const visible = local.slice(0, Math.min(6, Math.max(1, local.length - 2))) + return `${visible}***@${domain}` +} + const ICONS = '/nw-themes/nw-ryu/nw-images/nw-icons' export default async function AccountPage({ params }: { params: Promise<{ locale: string }> }) { @@ -33,45 +42,27 @@ export default async function AccountPage({ params }: { params: Promise<{ locale
{t('basicData')} -
-

{t('bnetAccount')}: {data.bnetEmail}

-

{t('gameAccount')}: {data.gameAccount}

-

{t('regMail')}: {data.regMail}

-

{t('currentMail')}: {data.email}

-

{t('joindate')}: {data.joindate}

-

{t('lastIpWeb')}: {data.lastIp}

-

{t('lastIpServer')}: {data.lastAttemptIp}

+
+

{t('accountName')}: {data.gameAccount}

+

{t('regMail')}: {maskEmail(data.regMail)}

+

{t('currentMail')}: {maskEmail(data.email)}

+

{t('joindate')}: {data.joindate}

+

{t('lastIpWeb')}: {data.lastIp}

+

{t('lastIpServer')}: {data.lastAttemptIp}

{t('accountState')} -
+
{/* eslint-disable-next-line @next/next/no-img-element */} {`${t('level')} -

{t('dp')}: {data.dp}

-

{t('vp')}: {data.vp}

-

{t('battlepayCredits')}: {data.battlepayCredits}

-

- {t('securityToken')}:{' '} - - {data.securityTokenDate - ? `${t('requested')} - ${new Date(data.securityTokenDate).toLocaleString(locale)}` - : t('notRequested')} - -

- {data.isBanned ? ( - <> -

{t('banned')}: {t('yes')}

-

{t('banEnd')}: {data.unbanDate}

- - ) : ( - <> -

{t('banned')}: {t('no')}

-

{t('recruited')}: {data.isRecruited ? t('yes') : t('no')}

-

{t('recruitedFriends')}: {data.recruitedCount}

- - )} +

{t('dp')}: {data.dp} | {t('vp')}: {data.vp}

+

{t('securityToken')}: {data.securityTokenDate ? t('requested') : t('notRequested')}

+

{t('twofaLabel')}: {t('twofaOff')}

+

{t('banned')}: {data.isBanned ? t('yes') : t('no')} ({t('banHistoryLink')})

+

{t('recruited')}: {data.isRecruited ? t('yes') : t('no')}

+

{t('recruitedFriends')}: {data.recruitedCount}

diff --git a/web-next/messages/en.json b/web-next/messages/en.json index 2706029..7b9ba74 100644 --- a/web-next/messages/en.json +++ b/web-next/messages/en.json @@ -147,7 +147,11 @@ "svcRenameGuild": "Rename guild", "svcRenameGuildDesc": "Change your guild's name", "svcDPoints": "Get PD", - "svcDPointsDesc": "Get PD and access rewards" + "svcDPointsDesc": "Get PD and access rewards", + "accountName": "Account name", + "twofaLabel": "2FA (Two-step verification)", + "twofaOff": "Disabled", + "banHistoryLink": "View history" }, "SelectAccount": { "title": "Select your game account", diff --git a/web-next/messages/es.json b/web-next/messages/es.json index b46191f..0bdc83b 100644 --- a/web-next/messages/es.json +++ b/web-next/messages/es.json @@ -147,7 +147,11 @@ "svcRenameGuild": "Renombrar hermandad", "svcRenameGuildDesc": "Cambia el nombre de tu hermandad", "svcDPoints": "Adquirir PD", - "svcDPointsDesc": "Obtiene PD y accede a recompensas" + "svcDPointsDesc": "Obtiene PD y accede a recompensas", + "accountName": "Nombre de la cuenta", + "twofaLabel": "2FA (Verificación en 2 pasos)", + "twofaOff": "Desactivado", + "banHistoryLink": "Consultar historial" }, "SelectAccount": { "title": "Selecciona tu cuenta de juego", diff --git a/web-next/public/nw-themes/nw-ryu/nw-css/novawow-style.css b/web-next/public/nw-themes/nw-ryu/nw-css/novawow-style.css index 9a3e6b3..052cc24 100644 --- a/web-next/public/nw-themes/nw-ryu/nw-css/novawow-style.css +++ b/web-next/public/nw-themes/nw-ryu/nw-css/novawow-style.css @@ -917,6 +917,15 @@ textarea:focus, select:focus, input[type=password]:focus, input[type=number]:foc color: #b172ff; } +.account-ficon { + font-size: 16px; +} + +.account-info { + font-size: 19px; + line-height: 24px !important; +} + .token-icon { background-position: -174px -553px; }