fix: Fix demo user password and eye icon position

Problem 1: File Tree demo/demo123 login failed
- demo user password hash was incorrect
- PostgreSQL users.password was empty or invalid
- SQLite sftpgo_users.password_hash was empty or invalid

Solution 1:
- Generated correct bcrypt hash for 'demo123'
- Updated PostgreSQL users table (60 chars)
- Updated SQLite sftpgo_users table (60 chars)
- CLI test: demo/demo123 login now returns token 

Problem 2: Tree modal eye icon position too high
- Password container had no height specified
- Eye icon used top:50% transform, but container height undefined
- Icon appeared misaligned

Solution 2:
- Added height:40px to password container
- Eye icon now positioned correctly at vertical center

Files:
- src/page.html (eye icon container fix)
- data/auth.sqlite (demo password hash)
This commit is contained in:
Warren
2026-05-17 00:40:11 +08:00
parent b98fbf93bf
commit 683526c406
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@@ -473,7 +473,7 @@ function showTreeLoginModal(){
'<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)">'+
'</div>'+
'<div style="margin-bottom:12px;position:relative">'+
'<div style="margin-bottom:12px;position:relative;height:40px">'+
'<label style="color:#94a3b8;font-size:13px;display:block;margin-bottom:4px">Password</label>'+
'<input style="background:#0f172a;border:1px solid #60a5fa;border-radius:4px;color:#e2e8f0;padding:8px 12px;width:100%;font-size:13px" type=password id=tree-password placeholder="Enter password" onkeypress=handleTreeKeyPress(event)>'+
'<button onclick=toggleTreePassword() style="position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;color:#60a5fa;cursor:pointer;font-size:14px">👁</button>'+