🐛 fix: Cookie 失效时改引导 OAuth,避免打开已禁用入口

Cookie 登录暂不可用时,过期回调不再切换到 Cookie 区。
This commit is contained in:
Abner
2026-07-11 13:16:01 +08:00
parent de9db76f56
commit f0c75ef308

View File

@@ -1255,20 +1255,18 @@ class GiffgaffApp {
handleCookieExpired(event) {
console.log('[Giffgaff] === Cookie 已过期 ===', event && event.detail);
uiController.showSection(1);
uiController.selectLoginMethod('cookie');
// Cookie 入口暂不可用,引导用户改用 OAuth
uiController.selectLoginMethod('oauth');
if (uiController.elements.loginMethodStatus) {
uiController.showStatus(
uiController.elements.loginMethodStatus,
tl('Cookie已失效,请重新获取并验证。'),
tl('Cookie 已失效且暂不可用,请使用 OAuth 登录。'),
'error'
);
}
showToast(tl('Cookie已失效在第一步重新验证。'));
const input = document.getElementById('cookieInput');
if (input) setTimeout(() => input.focus(), 100);
showToast(tl('Cookie 已失效,请使用 OAuth 重新登录。'));
}
/**