diff --git a/web-next/app/globals.css b/web-next/app/globals.css index 95aa9e7..85ccd3b 100644 --- a/web-next/app/globals.css +++ b/web-next/app/globals.css @@ -386,12 +386,18 @@ textarea:focus { background: hsla(0, 0%, 100%, 0.1); color: #fff; } -.add-account-form { - display: inline; +/* El formulario de añadir cuenta sale en bloque, debajo del nombre. */ +.add-account-box { + display: block; + margin-top: 6px; } .add-account-input { min-width: 150px; } +.add-account-msg { + display: block; + margin-top: 4px; +} /* Colores de clase de WoW (nombre de personaje) */ .class-warrior { color: #c79c6e; } diff --git a/web-next/components/GameAccountSwitcher.tsx b/web-next/components/GameAccountSwitcher.tsx index 0a2a8c5..63a930d 100644 --- a/web-next/components/GameAccountSwitcher.tsx +++ b/web-next/components/GameAccountSwitcher.tsx @@ -43,8 +43,7 @@ export function GameAccountSwitcher({ } } - async function addAccount(e: React.FormEvent) { - e.preventDefault() + async function addAccount() { if (busy || !password) return setBusy(true) setError(null) @@ -97,20 +96,22 @@ export function GameAccountSwitcher({ + {adding && ( -
+ setPassword(e.target.value)} + onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); addAccount() } }} className="account-select add-account-input" + autoComplete="off" /> - - {error && {error}} - + {error && {error}} +
)} )