fix: Fix File Tree Authentication modal close button

Problem:
- Close button (✕) only removed 'active' class
- Modal display was set via style.display='block'
- Button didn't change display property, so modal stayed visible

Solution:
- Updated onclick to: this.parentElement.style.display='none'
- Also removes 'active' class for consistency
- Modal now properly hides when clicking ✕ button

Files:
- src/page.html (line ~850)
This commit is contained in:
Warren
2026-05-16 23:45:21 +08:00
parent cc18d9e6e0
commit b98fbf93bf

View File

@@ -467,7 +467,7 @@ function showTreeLoginModal(){
m=document.createElement('div');
m.id='mb-tree-login-modal';
m.style.cssText='display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#1e293b;border:1px solid #334155;padding:24px;border-radius:8px;z-index:10000;min-width:320px';
m.innerHTML='<button onclick=this.parentElement.classList.remove("active") style="position:absolute;top:12px;right:12px;background:none;border:none;color:#64748b;font-size:18px;cursor:pointer">✕</button>'+
m.innerHTML='<button onclick="this.parentElement.style.display=\'none\';this.parentElement.classList.remove(\'active\')" style="position:absolute;top:12px;right:12px;background:none;border:none;color:#64748b;font-size:18px;cursor:pointer">✕</button>'+
'<div style="color:#60a5fa;font-size:16px;font-weight:600;margin-bottom:16px">File Tree Authentication</div>'+
'<div style="margin-bottom:12px">'+
'<label style="color:#94a3b8;font-size:13px;display:block;margin-bottom:4px">User ID</label>'+