web-next: migrar toda la UI al tema real nw-ryu
Reescritura completa del frontend Next.js del sistema visual Tailwind "simulado" al tema Django original (nw-ryu), para paridad pixel con la web actual antes del cutover. - Tema real: copia de static/nw-themes/nw-ryu + favicons a public/, el layout carga el novavow-style.css real de ultimo (gana la cascada sobre Tailwind) + Font Awesome. - Shell replicando los partials Django: SiteHeader, Video, Social, Footer, ServerClock; home con estructura real (main-page/middle-content/...). - Helpers reutilizables: PageShell (main-page > middle-content > body-content > title-content) y ServiceBox (title-box-content + back-to-account). - Paginas migradas a clases reales del tema (fieldset/tool-button/char-box/ item-box/info-box-light/max-center-table/alert-message/botones reales), eliminando el markup Tailwind (.nw-btn/.nw-card/.nw-input): auth (login/register/recover/reset/select-account/activate), cuenta + servicios de personaje (revive/unstuck/rename/customize/ change-race/change-faction/level-up/gold/transfer + pago Stripe), ajustes (change-password/change-email/security-token), comunidad (vote-points/recruit/battlepay), foro completo, y admin (indice + 7 secciones + los Admin*Manager). - Se conserva el bilingue (next-intl); claves nuevas en messages/es|en.json. Verificado: typecheck + build OK; rutas protegidas 307->login; sin MISSING_MESSAGE; cero Tailwind residual (solo .nw-tool-btn/.nw-page, clases propias en globals.css). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -56,60 +56,53 @@ export function AdminUsersManager() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<form onSubmit={search} className="mb-6 flex gap-2">
|
||||
<form onSubmit={search} className="centered separate">
|
||||
<input
|
||||
type="search"
|
||||
type="text"
|
||||
value={q}
|
||||
onChange={(e) => setQ(e.target.value)}
|
||||
placeholder={t('userSearchPlaceholder')}
|
||||
className="nw-input flex-1"
|
||||
/>
|
||||
<button type="submit" disabled={busy} className="nw-btn whitespace-nowrap disabled:opacity-60">
|
||||
/>{' '}
|
||||
<button type="submit" disabled={busy} className="search-items-button">
|
||||
{busy ? t('searching') : t('search')}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{searched && accounts.length === 0 ? (
|
||||
<p className="text-amber-200/70">{t('noUsers')}</p>
|
||||
<p className="second-brown centered">{t('noUsers')}</p>
|
||||
) : (
|
||||
<ul className="divide-y divide-amber-900/40">
|
||||
{accounts.map((a) => (
|
||||
<li key={a.id} className="flex flex-wrap items-center justify-between gap-3 py-3">
|
||||
<div className="min-w-0">
|
||||
<p className="flex items-center gap-2 font-semibold text-amber-300">
|
||||
{a.username}
|
||||
{a.gmlevel > 0 && (
|
||||
<span className="rounded bg-nw-gold/15 px-1.5 py-0.5 text-xs text-nw-gold-light">GM {a.gmlevel}</span>
|
||||
<table className="max-center-table">
|
||||
<tbody>
|
||||
{accounts.map((a) => (
|
||||
<tr key={a.id} className="team-center-table-tr">
|
||||
<td className="lefted separate">
|
||||
<span className="yellow-info">{a.username}</span>{' '}
|
||||
{a.gmlevel > 0 && <span className="second-yellow small-font">[GM {a.gmlevel}]</span>}{' '}
|
||||
{a.online && <span className="green-info small-font">● {t('online')}</span>}{' '}
|
||||
{a.banned && <span className="red-info2 small-font">⛔ {t('banned')}</span>}
|
||||
<p className="third-brown small-font">
|
||||
#{a.id}
|
||||
{a.email && ` · ${a.email}`}
|
||||
{a.last_login && ` · ${t('lastLogin')}: ${new Date(a.last_login).toLocaleDateString()}`}
|
||||
{a.banned && a.ban_reason && ` · ${a.ban_reason}`}
|
||||
{a.banned && a.ban_until && ` (${new Date(a.ban_until).toLocaleDateString()})`}
|
||||
</p>
|
||||
</td>
|
||||
<td className="real-info-box">
|
||||
{a.banned ? (
|
||||
<button onClick={() => act(a, 'unban')} className="nw-tool-btn green-info">
|
||||
{t('unban')}
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={() => act(a, 'ban')} className="nw-tool-btn red-info2">
|
||||
{t('ban')}
|
||||
</button>
|
||||
)}
|
||||
{a.online && <span className="text-xs text-green-400">● {t('online')}</span>}
|
||||
{a.banned && <span className="text-xs text-red-400">⛔ {t('banned')}</span>}
|
||||
</p>
|
||||
<p className="truncate text-xs text-amber-200/50">
|
||||
#{a.id}
|
||||
{a.email && ` · ${a.email}`}
|
||||
{a.last_login && ` · ${t('lastLogin')}: ${new Date(a.last_login).toLocaleDateString()}`}
|
||||
{a.banned && a.ban_reason && ` · ${a.ban_reason}`}
|
||||
{a.banned && a.ban_until && ` (${new Date(a.ban_until).toLocaleDateString()})`}
|
||||
</p>
|
||||
</div>
|
||||
{a.banned ? (
|
||||
<button
|
||||
onClick={() => act(a, 'unban')}
|
||||
className="rounded border border-green-900/60 px-3 py-1 text-sm text-green-400 hover:bg-green-950/40"
|
||||
>
|
||||
{t('unban')}
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
onClick={() => act(a, 'ban')}
|
||||
className="rounded border border-red-900/60 px-3 py-1 text-sm text-red-400 hover:bg-red-950/40"
|
||||
>
|
||||
{t('ban')}
|
||||
</button>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user