diff --git a/web-next/app/[locale]/activate-account/ActivateClient.tsx b/web-next/app/[locale]/activate-account/ActivateClient.tsx index c1612c5..6b2ec81 100644 --- a/web-next/app/[locale]/activate-account/ActivateClient.tsx +++ b/web-next/app/[locale]/activate-account/ActivateClient.tsx @@ -43,7 +43,7 @@ export function ActivateClient({ hash }: { hash: string }) { <> {t('success')}

- {t('goLogin')} + {t('goLogin')}

)} diff --git a/web-next/app/[locale]/admin/forum/page.tsx b/web-next/app/[locale]/admin/forum/page.tsx index 2b51c38..8aaf9af 100644 --- a/web-next/app/[locale]/admin/forum/page.tsx +++ b/web-next/app/[locale]/admin/forum/page.tsx @@ -13,7 +13,7 @@ export default async function AdminForumPage({ params }: { params: Promise<{ loc setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const groups = await listCategoriesWithForums() return ( diff --git a/web-next/app/[locale]/admin/gold/page.tsx b/web-next/app/[locale]/admin/gold/page.tsx index b2ced8b..7401f56 100644 --- a/web-next/app/[locale]/admin/gold/page.tsx +++ b/web-next/app/[locale]/admin/gold/page.tsx @@ -13,7 +13,7 @@ export default async function AdminGoldPage({ params }: { params: Promise<{ loca setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const options = await listGoldOptions() return ( diff --git a/web-next/app/[locale]/admin/news/page.tsx b/web-next/app/[locale]/admin/news/page.tsx index 711dd5c..2c0f640 100644 --- a/web-next/app/[locale]/admin/news/page.tsx +++ b/web-next/app/[locale]/admin/news/page.tsx @@ -13,7 +13,7 @@ export default async function AdminNewsPage({ params }: { params: Promise<{ loca setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const news = await listNews() return ( diff --git a/web-next/app/[locale]/admin/page.tsx b/web-next/app/[locale]/admin/page.tsx index 0c29106..148b835 100644 --- a/web-next/app/[locale]/admin/page.tsx +++ b/web-next/app/[locale]/admin/page.tsx @@ -11,7 +11,7 @@ export default async function AdminPage({ params }: { params: Promise<{ locale: setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const items: { href: string; label: string; icon: string }[] = [ diff --git a/web-next/app/[locale]/admin/prices/page.tsx b/web-next/app/[locale]/admin/prices/page.tsx index 00e28d4..fdf0443 100644 --- a/web-next/app/[locale]/admin/prices/page.tsx +++ b/web-next/app/[locale]/admin/prices/page.tsx @@ -13,7 +13,7 @@ export default async function AdminPricesPage({ params }: { params: Promise<{ lo setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const prices = await getAllPrices() return ( diff --git a/web-next/app/[locale]/admin/promo/page.tsx b/web-next/app/[locale]/admin/promo/page.tsx index 2f332ff..25c27fe 100644 --- a/web-next/app/[locale]/admin/promo/page.tsx +++ b/web-next/app/[locale]/admin/promo/page.tsx @@ -13,7 +13,7 @@ export default async function AdminPromoPage({ params }: { params: Promise<{ loc setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const codes = await listPromoCodes() return ( diff --git a/web-next/app/[locale]/admin/recruit/page.tsx b/web-next/app/[locale]/admin/recruit/page.tsx index 704fdc9..70d3711 100644 --- a/web-next/app/[locale]/admin/recruit/page.tsx +++ b/web-next/app/[locale]/admin/recruit/page.tsx @@ -13,7 +13,7 @@ export default async function AdminRecruitPage({ params }: { params: Promise<{ l setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const rewards = await listRecruitRewards() return ( diff --git a/web-next/app/[locale]/admin/users/page.tsx b/web-next/app/[locale]/admin/users/page.tsx index e439ec0..e0969aa 100644 --- a/web-next/app/[locale]/admin/users/page.tsx +++ b/web-next/app/[locale]/admin/users/page.tsx @@ -12,7 +12,7 @@ export default async function AdminUsersPage({ params }: { params: Promise<{ loc setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) return ( diff --git a/web-next/app/[locale]/admin/votes/page.tsx b/web-next/app/[locale]/admin/votes/page.tsx index 89a817b..2c15d55 100644 --- a/web-next/app/[locale]/admin/votes/page.tsx +++ b/web-next/app/[locale]/admin/votes/page.tsx @@ -13,7 +13,7 @@ export default async function AdminVotesPage({ params }: { params: Promise<{ loc setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const sites = await listVoteSites() return ( diff --git a/web-next/app/[locale]/ban-history/page.tsx b/web-next/app/[locale]/ban-history/page.tsx index f8f40d3..a8a71fb 100644 --- a/web-next/app/[locale]/ban-history/page.tsx +++ b/web-next/app/[locale]/ban-history/page.tsx @@ -102,7 +102,7 @@ export default async function BanHistoryPage({ params }: { params: Promise<{ loc const t = await getTranslations('History') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const { bans, mutes } = await getSanctions(session.accountId!, session.bnetId) diff --git a/web-next/app/[locale]/battlepay/page.tsx b/web-next/app/[locale]/battlepay/page.tsx index cfa75c8..568d692 100644 --- a/web-next/app/[locale]/battlepay/page.tsx +++ b/web-next/app/[locale]/battlepay/page.tsx @@ -12,7 +12,7 @@ export default async function BattlepayPage({ params }: { params: Promise<{ loca setRequestLocale(locale) const t = await getTranslations('Battlepay') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const orders = await getPendingOrders(session.accountId ?? 0) diff --git a/web-next/app/[locale]/change-email/page.tsx b/web-next/app/[locale]/change-email/page.tsx index eaebbf2..570bc2e 100644 --- a/web-next/app/[locale]/change-email/page.tsx +++ b/web-next/app/[locale]/change-email/page.tsx @@ -12,7 +12,7 @@ export default async function ChangeEmailPage({ params }: { params: Promise<{ lo setRequestLocale(locale) const t = await getTranslations('ChangeEmail') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) return ( diff --git a/web-next/app/[locale]/change-faction-character/page.tsx b/web-next/app/[locale]/change-faction-character/page.tsx index 04db50d..d4e16cc 100644 --- a/web-next/app/[locale]/change-faction-character/page.tsx +++ b/web-next/app/[locale]/change-faction-character/page.tsx @@ -33,7 +33,7 @@ export default async function ChangeFactionCharacterPage({ params }: { params: P setRequestLocale(locale) const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getChangeFactionPrice()]) diff --git a/web-next/app/[locale]/change-password/ChangePasswordForm.tsx b/web-next/app/[locale]/change-password/ChangePasswordForm.tsx index bd32619..7ca7520 100644 --- a/web-next/app/[locale]/change-password/ChangePasswordForm.tsx +++ b/web-next/app/[locale]/change-password/ChangePasswordForm.tsx @@ -42,7 +42,7 @@ export function ChangePasswordForm() { setDone(true) setMessage({ ok: true, text: t('success') }) setTimeout(() => { - router.push('/login') + router.push('/log-in') router.refresh() }, 2500) } else { diff --git a/web-next/app/[locale]/change-password/page.tsx b/web-next/app/[locale]/change-password/page.tsx index 32f28e1..c880408 100644 --- a/web-next/app/[locale]/change-password/page.tsx +++ b/web-next/app/[locale]/change-password/page.tsx @@ -12,7 +12,7 @@ export default async function ChangePasswordPage({ params }: { params: Promise<{ setRequestLocale(locale) const t = await getTranslations('ChangePassword') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) return ( diff --git a/web-next/app/[locale]/change-race-character/page.tsx b/web-next/app/[locale]/change-race-character/page.tsx index f8d36d3..9a8a322 100644 --- a/web-next/app/[locale]/change-race-character/page.tsx +++ b/web-next/app/[locale]/change-race-character/page.tsx @@ -21,7 +21,7 @@ export default async function ChangeRaceCharacterPage({ params }: { params: Prom setRequestLocale(locale) const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getChangeRacePrice()]) diff --git a/web-next/app/[locale]/create-account/page.tsx b/web-next/app/[locale]/create-account/page.tsx index dcddc4d..e38317a 100644 --- a/web-next/app/[locale]/create-account/page.tsx +++ b/web-next/app/[locale]/create-account/page.tsx @@ -1,17 +1,32 @@ +import type { Metadata } from 'next' import { getTranslations, setRequestLocale } from 'next-intl/server' import { PageShell } from '@/components/PageShell' import { RegisterForm } from './RegisterForm' -export default async function RegisterPage({ params }: { params: Promise<{ locale: string }> }) { +export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise { + const { locale } = await params + const t = await getTranslations({ locale, namespace: 'Register' }) + return { title: t('title') } +} + +export default async function CreateAccountPage({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('Register') return ( -
+
-

{t('info')}

+

{t('bnetType')}

+

{t('passwordRule')}

+

{t('emailRule')}

+
+

{t('activation1')}

+

{t('activation2')}

+

+ {t('loginHint')} +

diff --git a/web-next/app/[locale]/customize-character/page.tsx b/web-next/app/[locale]/customize-character/page.tsx index f609b23..f0e26d8 100644 --- a/web-next/app/[locale]/customize-character/page.tsx +++ b/web-next/app/[locale]/customize-character/page.tsx @@ -21,7 +21,7 @@ export default async function CustomizeCharacterPage({ params }: { params: Promi setRequestLocale(locale) const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getCustomizePrice()]) diff --git a/web-next/app/[locale]/d-points/page.tsx b/web-next/app/[locale]/d-points/page.tsx index 1d28ea5..eb899f5 100644 --- a/web-next/app/[locale]/d-points/page.tsx +++ b/web-next/app/[locale]/d-points/page.tsx @@ -21,7 +21,7 @@ export default async function DPointsPage({ params }: { params: Promise<{ locale const t = await getTranslations('Points') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) // SumUp no tiene webhooks: reconciliamos aquí los pagos SumUp pendientes de diff --git a/web-next/app/[locale]/gold-character/page.tsx b/web-next/app/[locale]/gold-character/page.tsx index e9fc743..89b3888 100644 --- a/web-next/app/[locale]/gold-character/page.tsx +++ b/web-next/app/[locale]/gold-character/page.tsx @@ -23,7 +23,7 @@ export default async function GoldCharacterPage({ params }: { params: Promise<{ setRequestLocale(locale) const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, options] = await Promise.all([getGameCharacters(session.accountId!), getGoldOptions()]) diff --git a/web-next/app/[locale]/level-up-character/page.tsx b/web-next/app/[locale]/level-up-character/page.tsx index 1c01a91..c47f244 100644 --- a/web-next/app/[locale]/level-up-character/page.tsx +++ b/web-next/app/[locale]/level-up-character/page.tsx @@ -21,7 +21,7 @@ export default async function LevelUpCharacterPage({ params }: { params: Promise setRequestLocale(locale) const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getLevelUpPrice()]) diff --git a/web-next/app/[locale]/login/LoginForm.tsx b/web-next/app/[locale]/log-in/LoginForm.tsx similarity index 100% rename from web-next/app/[locale]/login/LoginForm.tsx rename to web-next/app/[locale]/log-in/LoginForm.tsx diff --git a/web-next/app/[locale]/login/page.tsx b/web-next/app/[locale]/log-in/page.tsx similarity index 91% rename from web-next/app/[locale]/login/page.tsx rename to web-next/app/[locale]/log-in/page.tsx index 51befdc..398fa6b 100644 --- a/web-next/app/[locale]/login/page.tsx +++ b/web-next/app/[locale]/log-in/page.tsx @@ -22,7 +22,7 @@ export default async function LoginPage({ params }: { params: Promise<{ locale:


- {t('newHere')} {t('createAccount')} + {t('newHere')} {t('createAccount')}


{t('publicNote')}

diff --git a/web-next/app/[locale]/my-account/page.tsx b/web-next/app/[locale]/my-account/page.tsx index c93969d..3d55038 100644 --- a/web-next/app/[locale]/my-account/page.tsx +++ b/web-next/app/[locale]/my-account/page.tsx @@ -36,7 +36,7 @@ export default async function AccountPage({ params }: { params: Promise<{ locale const t = await getTranslations('Account') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) // Acredita cualquier pago SumUp pendiente de esta cuenta (SumUp no tiene diff --git a/web-next/app/[locale]/points-history/page.tsx b/web-next/app/[locale]/points-history/page.tsx index f8c41a8..422dd68 100644 --- a/web-next/app/[locale]/points-history/page.tsx +++ b/web-next/app/[locale]/points-history/page.tsx @@ -32,7 +32,7 @@ export default async function PointsHistoryPage({ params }: { params: Promise<{ const t = await getTranslations('History') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [movements, balances] = await Promise.all([ diff --git a/web-next/app/[locale]/promo-code/page.tsx b/web-next/app/[locale]/promo-code/page.tsx index e77589a..68d81d2 100644 --- a/web-next/app/[locale]/promo-code/page.tsx +++ b/web-next/app/[locale]/promo-code/page.tsx @@ -21,7 +21,7 @@ export default async function PromoCodePage({ params }: { params: Promise<{ loca const t = await getTranslations('Points') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const realm = await getRealmName() diff --git a/web-next/app/[locale]/quest-character/page.tsx b/web-next/app/[locale]/quest-character/page.tsx index f038634..f4456eb 100644 --- a/web-next/app/[locale]/quest-character/page.tsx +++ b/web-next/app/[locale]/quest-character/page.tsx @@ -33,7 +33,7 @@ export default async function QuestCharacterPage({ params }: { params: Promise<{ const t = await getTranslations('CharService') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const chars = await getGameCharacters(session.accountId!) diff --git a/web-next/app/[locale]/recruit-a-friend/page.tsx b/web-next/app/[locale]/recruit-a-friend/page.tsx index 0546533..89094cc 100644 --- a/web-next/app/[locale]/recruit-a-friend/page.tsx +++ b/web-next/app/[locale]/recruit-a-friend/page.tsx @@ -133,7 +133,7 @@ export default async function RecruitPage({ params }: { params: Promise<{ locale /> ) : (

- {t('loginToClaim')} + {t('loginToClaim')}

)}
diff --git a/web-next/app/[locale]/rename-character/page.tsx b/web-next/app/[locale]/rename-character/page.tsx index 98d19c2..01468f2 100644 --- a/web-next/app/[locale]/rename-character/page.tsx +++ b/web-next/app/[locale]/rename-character/page.tsx @@ -21,7 +21,7 @@ export default async function RenameCharacterPage({ params }: { params: Promise< setRequestLocale(locale) const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getRenamePrice()]) diff --git a/web-next/app/[locale]/rename-guild/page.tsx b/web-next/app/[locale]/rename-guild/page.tsx index 367224c..bf0ba41 100644 --- a/web-next/app/[locale]/rename-guild/page.tsx +++ b/web-next/app/[locale]/rename-guild/page.tsx @@ -21,7 +21,7 @@ export default async function RenameGuildPage({ params }: { params: Promise<{ lo const t = await getTranslations('Points') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const guilds = await getGuildMasterGuilds(session.accountId!) diff --git a/web-next/app/[locale]/reset-password/ResetForm.tsx b/web-next/app/[locale]/reset-password/ResetForm.tsx index 18b506f..55a0083 100644 --- a/web-next/app/[locale]/reset-password/ResetForm.tsx +++ b/web-next/app/[locale]/reset-password/ResetForm.tsx @@ -30,7 +30,7 @@ export function ResetForm({ token }: { token: string }) { if (data.success) { setDone(true) setMessage({ ok: true, text: t('success') }) - setTimeout(() => router.push('/login'), 2500) + setTimeout(() => router.push('/log-in'), 2500) } else { const key = (ERROR_KEYS as readonly string[]).includes(data.error ?? '') ? data.error! : 'genericError' setMessage({ ok: false, text: t(key) }) @@ -75,7 +75,7 @@ export function ResetForm({ token }: { token: string }) {
{done && (

- {t('goLogin')} + {t('goLogin')}

)} diff --git a/web-next/app/[locale]/restore-character/page.tsx b/web-next/app/[locale]/restore-character/page.tsx index 494948c..9642126 100644 --- a/web-next/app/[locale]/restore-character/page.tsx +++ b/web-next/app/[locale]/restore-character/page.tsx @@ -22,7 +22,7 @@ export default async function RestoreCharacterPage({ params }: { params: Promise const t = await getTranslations('CharService') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const chars = await getRestorableCharacters(session.accountId!) diff --git a/web-next/app/[locale]/restore-items/page.tsx b/web-next/app/[locale]/restore-items/page.tsx index d87c485..fb03265 100644 --- a/web-next/app/[locale]/restore-items/page.tsx +++ b/web-next/app/[locale]/restore-items/page.tsx @@ -23,7 +23,7 @@ export default async function RestoreItemsPage({ params }: { params: Promise<{ l const t = await getTranslations('CharService') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getRestoreItemPrice()]) diff --git a/web-next/app/[locale]/security-2falogin/page.tsx b/web-next/app/[locale]/security-2falogin/page.tsx index ead5879..c822514 100644 --- a/web-next/app/[locale]/security-2falogin/page.tsx +++ b/web-next/app/[locale]/security-2falogin/page.tsx @@ -22,7 +22,7 @@ export default async function Security2faLoginPage({ params }: { params: Promise const t = await getTranslations('Misc') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const enabled = session.accountId ? await is2faEnabled(session.accountId) : false diff --git a/web-next/app/[locale]/security-history/page.tsx b/web-next/app/[locale]/security-history/page.tsx index 9033cf0..e9d3857 100644 --- a/web-next/app/[locale]/security-history/page.tsx +++ b/web-next/app/[locale]/security-history/page.tsx @@ -42,7 +42,7 @@ export default async function SecurityHistoryPage({ params }: { params: Promise< const t = await getTranslations('History') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const bnetEmail = session.bnetEmail || '' diff --git a/web-next/app/[locale]/security-token/page.tsx b/web-next/app/[locale]/security-token/page.tsx index 445d6c0..fdf19a4 100644 --- a/web-next/app/[locale]/security-token/page.tsx +++ b/web-next/app/[locale]/security-token/page.tsx @@ -15,7 +15,7 @@ export default async function SecurityTokenPage({ params }: { params: Promise<{ setRequestLocale(locale) const t = await getTranslations('SecurityToken') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) let tokenDate: string | null = null diff --git a/web-next/app/[locale]/select-account/page.tsx b/web-next/app/[locale]/select-account/page.tsx index 6f46069..ac9a92a 100644 --- a/web-next/app/[locale]/select-account/page.tsx +++ b/web-next/app/[locale]/select-account/page.tsx @@ -14,7 +14,7 @@ export default async function SelectAccountPage({ params }: { params: Promise<{ const t = await getTranslations('SelectAccount') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) // Etiqueta visible «15#1» → «WOW1» (mismo criterio que my-account/cabecera). const games = (await getGameAccounts(session.bnetId!)).map((g) => ({ ...g, label: wowAccountLabel(g.username) })) diff --git a/web-next/app/[locale]/send-gift/page.tsx b/web-next/app/[locale]/send-gift/page.tsx index 9c3a1c3..970f70a 100644 --- a/web-next/app/[locale]/send-gift/page.tsx +++ b/web-next/app/[locale]/send-gift/page.tsx @@ -23,7 +23,7 @@ export default async function SendGiftPage({ params }: { params: Promise<{ local const t = await getTranslations('CharService') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, catalog] = await Promise.all([getGameCharacters(session.accountId!), getGiftCatalog()]) diff --git a/web-next/app/[locale]/trade-points/page.tsx b/web-next/app/[locale]/trade-points/page.tsx index 6a0406f..af40940 100644 --- a/web-next/app/[locale]/trade-points/page.tsx +++ b/web-next/app/[locale]/trade-points/page.tsx @@ -21,7 +21,7 @@ export default async function TradePointsPage({ params }: { params: Promise<{ lo const t = await getTranslations('Points') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const chars = await getGameCharacters(session.accountId!) diff --git a/web-next/app/[locale]/trans-history/page.tsx b/web-next/app/[locale]/trans-history/page.tsx index 88e719d..885ec88 100644 --- a/web-next/app/[locale]/trans-history/page.tsx +++ b/web-next/app/[locale]/trans-history/page.tsx @@ -108,7 +108,7 @@ export default async function TransHistoryPage({ params }: { params: Promise<{ l const t = await getTranslations('History') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const txs = await getPaymentTransactions(session.accountId!) diff --git a/web-next/app/[locale]/transfer-character/page.tsx b/web-next/app/[locale]/transfer-character/page.tsx index 1cbceba..6e1d811 100644 --- a/web-next/app/[locale]/transfer-character/page.tsx +++ b/web-next/app/[locale]/transfer-character/page.tsx @@ -23,7 +23,7 @@ export default async function TransferCharacterPage({ params }: { params: Promis const t = await getTranslations('CharService') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getTransferPrice()]) diff --git a/web-next/app/[locale]/transfer-d-points/page.tsx b/web-next/app/[locale]/transfer-d-points/page.tsx index 0043a47..93b0289 100644 --- a/web-next/app/[locale]/transfer-d-points/page.tsx +++ b/web-next/app/[locale]/transfer-d-points/page.tsx @@ -21,7 +21,7 @@ export default async function TransferDPointsPage({ params }: { params: Promise< const t = await getTranslations('Points') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const balance = await getDPointsBalance(session.accountId!) diff --git a/web-next/app/[locale]/unstuck-character/page.tsx b/web-next/app/[locale]/unstuck-character/page.tsx index 628edb8..7d3fba1 100644 --- a/web-next/app/[locale]/unstuck-character/page.tsx +++ b/web-next/app/[locale]/unstuck-character/page.tsx @@ -14,7 +14,7 @@ export default async function UnstuckPage({ params }: { params: Promise<{ locale setRequestLocale(locale) const t = await getTranslations('Services') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const chars = await getGameCharacters(session.accountId!) diff --git a/web-next/components/ConfirmClient.tsx b/web-next/components/ConfirmClient.tsx index 09f707f..391f6bc 100644 --- a/web-next/components/ConfirmClient.tsx +++ b/web-next/components/ConfirmClient.tsx @@ -45,7 +45,7 @@ export function ConfirmClient({ {t('success')} {showLogin && (

- {t('goLogin')} + {t('goLogin')}

)} diff --git a/web-next/components/ReviveServiceContent.tsx b/web-next/components/ReviveServiceContent.tsx index da22ba5..ddda9fe 100644 --- a/web-next/components/ReviveServiceContent.tsx +++ b/web-next/components/ReviveServiceContent.tsx @@ -12,7 +12,7 @@ export async function ReviveServiceContent({ locale }: { locale: string }) { setRequestLocale(locale) const t = await getTranslations('Services') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const chars = await getGameCharacters(session.accountId!) diff --git a/web-next/components/ServicePageContent.tsx b/web-next/components/ServicePageContent.tsx index 08f19ea..1f1549b 100644 --- a/web-next/components/ServicePageContent.tsx +++ b/web-next/components/ServicePageContent.tsx @@ -16,7 +16,7 @@ export async function ServicePageContent({ service, locale }: { service: string; const t = await getTranslations('Paid') const session = await getSession() - if (!session.bnetId) redirect({ href: '/login', locale }) + if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), cfg!.price({})]) diff --git a/web-next/components/SiteHeader.tsx b/web-next/components/SiteHeader.tsx index 84b2190..14f8087 100644 --- a/web-next/components/SiteHeader.tsx +++ b/web-next/components/SiteHeader.tsx @@ -49,7 +49,7 @@ export function SiteHeader({ {loggedIn ? ( {t('header.home')} ) : ( - {t('header.register')} + {t('header.register')} )}
@@ -124,7 +124,7 @@ export function SiteHeader({
) : ( - + {t('header.login')} )} diff --git a/web-next/lib/recover.ts b/web-next/lib/recover.ts index 6831330..ecc5dbd 100644 --- a/web-next/lib/recover.ts +++ b/web-next/lib/recover.ts @@ -183,5 +183,5 @@ export async function resetPassword(token: string, newPassword: string, confPass return { success: false, error: 'genericError' } } await db(DB.default).query('UPDATE home_passwordreset SET used = 1 WHERE id = ?', [pr.id]) - return { success: true, redirect: '/login' } + return { success: true, redirect: '/log-in' } }