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} />