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(()=>({}));