Instead of calling hideLoginModal() and loadLinks(), the login now redirects to admin.php, providing direct access to the admin panel.
@@ -271,7 +271,7 @@
if(!pwd){ loginError.textContent = '请输入密码'; loginError.style.display = ''; return; }
loginConfirm.disabled = true; loginConfirm.textContent = '登录中…';
apiPost('login', {password: pwd}).then(data => {
- if(data.success){ hideLoginModal(); loadLinks(); }
+ if(data.success){ window.location.href = 'admin.php'; }
else { loginError.textContent = data.error || '密码错误'; loginError.style.display = ''; loginConfirm.disabled = false; loginConfirm.textContent = '登录'; }
}).catch(e => {
loginError.textContent = e.message; loginError.style.display = '';