From 16a34a2fad70b536f79ed5aa234fe065548a1f27 Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Thu, 21 May 2026 13:09:39 -0400 Subject: [PATCH] web-ui(wave 2): migrate login.html to new primitives Keeps the hero + AMPP Safe stamp + brand panel. Right column now uses wd-form-group / wd-input / wd-label / wd-btn primitives loaded from /dist/app.css. All JS ids and handlers preserved verbatim (login-form, setup-form, flash, show-setup, show-login). Visual changes: tighter form spacing, focus rings use accent-subtle ring, flash messages use the top-strip toast pattern. --- services/web-ui/public/login.html | 256 +++++++++++++++++++++++------- 1 file changed, 195 insertions(+), 61 deletions(-) diff --git a/services/web-ui/public/login.html b/services/web-ui/public/login.html index 9bbaa65..c0d8321 100644 --- a/services/web-ui/public/login.html +++ b/services/web-ui/public/login.html @@ -5,55 +5,180 @@ Sign in - Z-AMPP - - - + @@ -84,28 +209,37 @@

Sign in

Enter your credentials to continue.

-
-
- - + +
+ +
-
- - +
+ +
- +

Create admin

-

No accounts exist yet - create the first admin.

-
-
-
-
- +

No accounts exist yet, create the first admin.

+ +
+ + +
+
+ + +
+
+ + +
+
@@ -127,7 +261,7 @@ try{ const res = await fetch(API + '/login', {method:'POST',headers:{'Content-Type':'application/json'},credentials:'same-origin', body: JSON.stringify({username:$('username').value.trim(),password:$('password').value})}); - if(res.ok){ showFlash('Signed in - redirecting...','success'); setTimeout(()=>{location.href='home.html'},600); } + if(res.ok){ showFlash('Signed in, redirecting...','success'); setTimeout(()=>{location.href='home.html'},600); } else{ const d=await res.json().catch(()=>({})); showFlash(d.error||'Login failed','error'); } } catch(err){ showFlash('Network error: '+err.message,'error'); } finally{ btn.disabled=false; btn.textContent='Sign in'; } @@ -140,7 +274,7 @@ const res = await fetch(API + '/setup', {method:'POST',headers:{'Content-Type':'application/json'},credentials:'same-origin', body: JSON.stringify({username:$('su-username').value.trim(),password:$('su-password').value,display_name:$('su-display').value.trim()})}); if(res.ok){ - showFlash('Admin account created - you can now log in','success'); + showFlash('Admin account created, you can now log in','success'); setTimeout(()=>{ $('setup-panel').style.display='none'; $('login-panel').style.display='block'; },1200); } else{ const d=await res.json().catch(()=>({}));