From 3e47a3d2408805237a8405a0b3b9ee0a142bd476 Mon Sep 17 00:00:00 2001 From: adevopg Date: Mon, 13 Jul 2026 00:13:22 +0000 Subject: [PATCH] =?UTF-8?q?Aplica=20el=20sistema=20de=20dise=C3=B1o=20(nw-?= =?UTF-8?q?input/nw-btn/nw-card)=20a=20todas=20las=20p=C3=A1ginas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reemplazo masivo de los estilos sueltos repetidos por las clases del sistema visual en ~20 componentes/páginas (auth, cuenta, servicios de personaje, foro, admin, voto): - inputs -> .nw-input, botones primarios -> .nw-btn, tarjetas -> .nw-card. Cohesión visual completa con la home y la cabecera. Verificado: build OK, páginas clave 200/redirect correctos, clases aplicadas. Co-Authored-By: Claude Opus 4.8 (1M context) --- web-next/app/[locale]/account/page.tsx | 2 +- .../[locale]/change-email/ChangeEmailForm.tsx | 4 +- .../change-password/ChangePasswordForm.tsx | 4 +- .../[locale]/forum/topic/[topicId]/page.tsx | 2 +- web-next/app/[locale]/login/LoginForm.tsx | 6 +-- web-next/app/[locale]/recover/RecoverForm.tsx | 4 +- .../app/[locale]/register/RegisterForm.tsx | 4 +- .../app/[locale]/reset-password/ResetForm.tsx | 4 +- .../security-token/SecurityTokenForm.tsx | 2 +- .../select-account/SelectAccountForm.tsx | 2 +- .../api/character/rename/checkout/route.ts | 41 ------------------- web-next/app/globals.css | 3 ++ web-next/components/AdminNewsManager.tsx | 6 +-- web-next/components/AdminVotesManager.tsx | 6 +-- web-next/components/CharacterActionForm.tsx | 4 +- web-next/components/GoldForm.tsx | 4 +- web-next/components/NewTopicForm.tsx | 6 +-- web-next/components/PaidServiceForm.tsx | 4 +- web-next/components/ReplyForm.tsx | 4 +- web-next/components/TransferForm.tsx | 4 +- web-next/components/VotePanel.tsx | 2 +- 21 files changed, 40 insertions(+), 78 deletions(-) delete mode 100644 web-next/app/api/character/rename/checkout/route.ts diff --git a/web-next/app/[locale]/account/page.tsx b/web-next/app/[locale]/account/page.tsx index b9585ce..463d833 100644 --- a/web-next/app/[locale]/account/page.tsx +++ b/web-next/app/[locale]/account/page.tsx @@ -17,7 +17,7 @@ export default async function AccountPage({ params }: { params: Promise<{ locale const data = await getAccountDashboard(session) - const card = 'rounded-lg border border-amber-900/60 bg-[#241812] p-4' + const card = 'nw-card' return (
diff --git a/web-next/app/[locale]/change-email/ChangeEmailForm.tsx b/web-next/app/[locale]/change-email/ChangeEmailForm.tsx index aeedcce..667a51c 100644 --- a/web-next/app/[locale]/change-email/ChangeEmailForm.tsx +++ b/web-next/app/[locale]/change-email/ChangeEmailForm.tsx @@ -40,7 +40,7 @@ export function ChangeEmailForm() { } } - const field = 'w-full rounded border border-amber-900/60 bg-[#2c1e14] px-3 py-2' + const field = 'nw-input' return (
@@ -51,7 +51,7 @@ export function ChangeEmailForm() { upd('newEmail', e.target.value)} className={field} /> upd('confEmail', e.target.value)} className={field} /> upd('token', e.target.value)} className={field} /> - diff --git a/web-next/app/[locale]/change-password/ChangePasswordForm.tsx b/web-next/app/[locale]/change-password/ChangePasswordForm.tsx index 8b38c7e..25bcac2 100644 --- a/web-next/app/[locale]/change-password/ChangePasswordForm.tsx +++ b/web-next/app/[locale]/change-password/ChangePasswordForm.tsx @@ -56,7 +56,7 @@ export function ChangePasswordForm() { } } - const field = 'w-full rounded border border-amber-900/60 bg-[#2c1e14] px-3 py-2' + const field = 'nw-input' return (
@@ -66,7 +66,7 @@ export function ChangePasswordForm() { upd('newPassword', e.target.value)} className={field} /> upd('confPassword', e.target.value)} className={field} /> upd('token', e.target.value)} className={field} /> - diff --git a/web-next/app/[locale]/forum/topic/[topicId]/page.tsx b/web-next/app/[locale]/forum/topic/[topicId]/page.tsx index d1f00ff..8da0af3 100644 --- a/web-next/app/[locale]/forum/topic/[topicId]/page.tsx +++ b/web-next/app/[locale]/forum/topic/[topicId]/page.tsx @@ -37,7 +37,7 @@ export default async function TopicPage({
{posts.map((post) => ( -
+
{post.poster} {post.time && ( diff --git a/web-next/app/[locale]/login/LoginForm.tsx b/web-next/app/[locale]/login/LoginForm.tsx index 9bb5f80..284be58 100644 --- a/web-next/app/[locale]/login/LoginForm.tsx +++ b/web-next/app/[locale]/login/LoginForm.tsx @@ -59,7 +59,7 @@ export function LoginForm() { placeholder={t('email')} autoFocus required - className="w-full rounded border border-amber-900/60 bg-[#2c1e14] px-3 py-2" + className="nw-input" />
diff --git a/web-next/app/[locale]/recover/RecoverForm.tsx b/web-next/app/[locale]/recover/RecoverForm.tsx index d0ea59b..4b115f2 100644 --- a/web-next/app/[locale]/recover/RecoverForm.tsx +++ b/web-next/app/[locale]/recover/RecoverForm.tsx @@ -39,7 +39,7 @@ export function RecoverForm() { } } - const field = 'w-full rounded border border-amber-900/60 bg-[#2c1e14] px-3 py-2' + const field = 'nw-input' return (
@@ -52,7 +52,7 @@ export function RecoverForm() { setEmail(e.target.value)} required className={field} /> - diff --git a/web-next/app/[locale]/register/RegisterForm.tsx b/web-next/app/[locale]/register/RegisterForm.tsx index cdb8fcc..770985a 100644 --- a/web-next/app/[locale]/register/RegisterForm.tsx +++ b/web-next/app/[locale]/register/RegisterForm.tsx @@ -53,7 +53,7 @@ export function RegisterForm() { } } - const input = 'w-full rounded border border-amber-900/60 bg-[#2c1e14] px-3 py-2' + const input = 'nw-input' return (
@@ -69,7 +69,7 @@ export function RegisterForm() { {t('terms')} - diff --git a/web-next/app/[locale]/reset-password/ResetForm.tsx b/web-next/app/[locale]/reset-password/ResetForm.tsx index ac9e196..ff3e939 100644 --- a/web-next/app/[locale]/reset-password/ResetForm.tsx +++ b/web-next/app/[locale]/reset-password/ResetForm.tsx @@ -42,14 +42,14 @@ export function ResetForm({ token }: { token: string }) { } } - const field = 'w-full rounded border border-amber-900/60 bg-[#2c1e14] px-3 py-2' + const field = 'nw-input' return (
setPassword(e.target.value)} required className={field} /> setConfPassword(e.target.value)} required className={field} /> -
diff --git a/web-next/app/[locale]/security-token/SecurityTokenForm.tsx b/web-next/app/[locale]/security-token/SecurityTokenForm.tsx index 35f78be..dccbe23 100644 --- a/web-next/app/[locale]/security-token/SecurityTokenForm.tsx +++ b/web-next/app/[locale]/security-token/SecurityTokenForm.tsx @@ -43,7 +43,7 @@ export function SecurityTokenForm({ initialDate }: { initialDate: string | null diff --git a/web-next/app/[locale]/select-account/SelectAccountForm.tsx b/web-next/app/[locale]/select-account/SelectAccountForm.tsx index f29a5a7..f4f013c 100644 --- a/web-next/app/[locale]/select-account/SelectAccountForm.tsx +++ b/web-next/app/[locale]/select-account/SelectAccountForm.tsx @@ -45,7 +45,7 @@ export function SelectAccountForm({ accounts }: { accounts: GameAccount[] }) { key={a.id} onClick={() => select(a.id)} disabled={busy !== null} - className="w-full rounded bg-amber-600 px-4 py-2 font-semibold text-[#1b120b] disabled:opacity-60" + className="w-full nw-btn disabled:opacity-60" > {busy === a.id ? t('entering') : a.username} diff --git a/web-next/app/api/character/rename/checkout/route.ts b/web-next/app/api/character/rename/checkout/route.ts deleted file mode 100644 index 5a1fe65..0000000 --- a/web-next/app/api/character/rename/checkout/route.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { getSession } from '@/lib/session' -import { getGameCharacters } from '@/lib/characters' -import { getRenamePrice } from '@/lib/prices' -import { createCheckoutSession } from '@/lib/stripe' - -export async function POST(request: Request) { - const session = await getSession() - if (!session.accountId) return Response.json({ success: false, error: 'notAuthenticated' }, { status: 401 }) - - let character = '' - try { - const body = await request.json() - character = String(body.character ?? '') - } catch { - return Response.json({ success: false, error: 'invalidRequest' }, { status: 400 }) - } - if (!character) return Response.json({ success: false, error: 'invalidCharacter' }) - - const chars = await getGameCharacters(session.accountId) - if (!chars.find((c) => c.name === character)) { - return Response.json({ success: false, error: 'invalidCharacter' }) - } - - const price = await getRenamePrice() - const site = process.env.SITE_URL || '' - const ip = (request.headers.get('x-forwarded-for') || '').split(',')[0].trim() || '0.0.0.0' - - const r = await createCheckoutSession({ - accountId: session.accountId, - username: session.username || '', - email: session.bnetEmail || '', - acoreIp: ip, - amount: price, - characterName: character, - productName: `Renombrar personaje: ${character}`, - successUrl: `${site}/rename/success`, - cancelUrl: `${site}/rename`, - }) - if (!r.success || !r.url) return Response.json({ success: false, error: 'stripeError' }) - return Response.json({ success: true, url: r.url }) -} diff --git a/web-next/app/globals.css b/web-next/app/globals.css index f931a77..9e8bd84 100644 --- a/web-next/app/globals.css +++ b/web-next/app/globals.css @@ -39,6 +39,9 @@ body { .nw-heading { @apply bg-gradient-to-b from-nw-gold-light to-nw-gold bg-clip-text font-extrabold tracking-wide text-transparent; } + .nw-input { + @apply w-full rounded-md border border-nw-border bg-nw-panel-2 px-3 py-2 text-nw-text outline-none transition focus:border-nw-gold; + } } /* Contenido HTML de noticias/foro */ diff --git a/web-next/components/AdminNewsManager.tsx b/web-next/components/AdminNewsManager.tsx index 931be77..c1037f5 100644 --- a/web-next/components/AdminNewsManager.tsx +++ b/web-next/components/AdminNewsManager.tsx @@ -47,15 +47,15 @@ export function AdminNewsManager({ initialNews }: { initialNews: NewsItem[] }) { if (data.success) setNews(news.filter((n) => n.id !== id)) } - const field = 'w-full rounded border border-amber-900/60 bg-[#2c1e14] px-3 py-2' + const field = 'nw-input' return (
-
+ setTitulo(e.target.value)} placeholder={t('newsTitle')} maxLength={200} className={field} />