feat(auth): redesign Login and Setup pages with split-panel branding layout (#153)

Replace plain Card-based Login and Setup forms with a professional
split-panel layout: always-dark branding panel (dot grid texture, logo,
tagline, cyan accent line) on the left, theme-aware form on the right.
Mobile collapses to single column with compact logo header.

- Add optional admin email field on Setup for license recovery
- Backend accepts and stores admin_email in setup endpoint
- Fix data-stacks-loaded attribute forwarding (wrap in div, use string values)
This commit is contained in:
Anso
2026-03-25 10:27:31 -04:00
committed by GitHub
parent a5d66f6c43
commit e0319b5dae
6 changed files with 146 additions and 53 deletions
+5 -1
View File
@@ -277,7 +277,7 @@ app.post('/api/auth/setup', authRateLimiter, async (req: Request, res: Response)
return;
}
const { username, password, confirmPassword } = req.body;
const { username, password, confirmPassword, admin_email } = req.body;
// Validation
if (!username || !password || !confirmPassword) {
@@ -307,6 +307,10 @@ app.post('/api/auth/setup', authRateLimiter, async (req: Request, res: Response)
dbSvc.updateGlobalSetting('auth_password_hash', passwordHash);
dbSvc.updateGlobalSetting('auth_jwt_secret', jwtSecret);
if (admin_email && typeof admin_email === 'string') {
dbSvc.updateGlobalSetting('admin_email', admin_email.trim());
}
// Issue JWT and log user in
const token = jwt.sign({ username }, jwtSecret, { expiresIn: '24h' });
res.cookie(COOKIE_NAME, token, getCookieOptions(req));