Add default user 'demo' on login page
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

This commit is contained in:
Warren
2026-06-30 07:47:52 +08:00
parent fe983c6528
commit dfe464303d

View File

@@ -489,7 +489,7 @@ function showTreeLoginModal(){
'<div style="color:#60a5fa;font-size:16px;font-weight:600;margin-bottom:16px">File Tree Authentication</div>'+ '<div style="color:#60a5fa;font-size:16px;font-weight:600;margin-bottom:16px">File Tree Authentication</div>'+
'<div style="margin-bottom:12px">'+ '<div style="margin-bottom:12px">'+
'<label style="color:#94a3b8;font-size:13px;display:block;margin-bottom:4px">User ID</label>'+ '<label style="color:#94a3b8;font-size:13px;display:block;margin-bottom:4px">User ID</label>'+
'<input style="background:#0f172a;border:1px solid #60a5fa;border-radius:4px;color:#e2e8f0;padding:8px 12px;width:100%;font-size:13px" type=text id=tree-user placeholder="Enter user ID (e.g., demo)">'+ '<input style="background:#0f172a;border:1px solid #60a5fa;border-radius:4px;color:#e2e8f0;padding:8px 12px;width:100%;font-size:13px" type=text id=tree-user placeholder="Enter user ID" value="demo">'+
'</div>'+ '</div>'+
'<div style="margin-bottom:12px;position:relative">'+ '<div style="margin-bottom:12px;position:relative">'+
'<label style="color:#94a3b8;font-size:13px;display:block;margin-bottom:4px">Password</label>'+ '<label style="color:#94a3b8;font-size:13px;display:block;margin-bottom:4px">Password</label>'+
@@ -501,13 +501,13 @@ function showTreeLoginModal(){
document.body.appendChild(m); document.body.appendChild(m);
} }
document.getElementById('tree-user').value=''; document.getElementById('tree-user').value='demo';
document.getElementById('tree-password').value=''; document.getElementById('tree-password').value='';
document.getElementById('tree-password').type='password'; document.getElementById('tree-password').type='password';
document.getElementById('tree-error').textContent=''; document.getElementById('tree-error').textContent='';
m.classList.add('active'); m.classList.add('active');
m.style.display='block'; m.style.display='block';
document.getElementById('tree-user').focus(); document.getElementById('tree-password').focus();
} }
function handleTreeKeyPress(e){ function handleTreeKeyPress(e){