fix: 静默登录失败时不跳回登录页

This commit is contained in:
zimk
2026-03-17 00:49:18 +08:00
parent 9d061975ab
commit 13f2ecc1c9

View File

@@ -256,8 +256,10 @@ async function loginWithKey(key, surfaceError = true) {
localStorage.removeItem(MODEL_STORAGE);
localStorage.removeItem(ACCESS_KEY_STORAGE);
renderModelDropdown();
if (surfaceError) setLoginError(error.message || '登录失败');
if (surfaceError) {
setLoginError(error.message || '登录失败');
showLogin();
}
return false;
}
}