/* ============================================================ ADMIN · login + editor de contenido ============================================================ */ /* ---- login ---- */ function LoginScreen({ onCancel }) { const { login, data, online } = useStore(); const [user, setUser] = useState(''); const [pass, setPass] = useState(''); const [err, setErr] = useState(false); const go = () => { if (!login(user, pass)) { setErr(true); setPass(''); } }; return (
{data.brand.logo ? : 'GC'}

Panel de administración

Ingresa con tu usuario para gestionar las cartas, reservas y el dashboard.

{setUser(e.target.value);setErr(false);}} onKeyDown={e=>e.key==='Enter'&&go()} placeholder="admin" /> {setPass(e.target.value);setErr(false);}} onKeyDown={e=>e.key==='Enter'&&go()} placeholder="••••••••" style={err?{borderColor:'var(--danger)',boxShadow:'0 0 0 3px rgba(163,58,42,.12)'}:null} /> {err &&
Usuario o clave incorrectos.
}

Acceso inicial: admin / chimu2027
{online===true?'● Conectado al servidor':'○ Modo local (sin servidor)'}

); } /* ---- small name/subtitle prompt ---- */ function NamePrompt({ title, fields, initial, onSave, onClose }) { const [v, setV] = useState(initial || {}); return ( }> {fields.map(f => ( {f.area ?