diff --git a/web/frontend/src/pages/HuyaAccountsPage.tsx b/web/frontend/src/pages/HuyaAccountsPage.tsx index 2d383fa..4364fc2 100644 --- a/web/frontend/src/pages/HuyaAccountsPage.tsx +++ b/web/frontend/src/pages/HuyaAccountsPage.tsx @@ -273,6 +273,7 @@ export default function HuyaAccountsPage() { }, [tags]); const selectedCount = selectedAllMatching ? total : selectedRowKeys.length; + const loginQueueBusy = loginQueuePhase === 'login' || loginQueuePhase === 'wait'; const selectionPayload = useMemo(() => ({ account_ids: selectedAllMatching ? [] : selectedRowKeys.map((key) => Number(key)), all_matching: selectedAllMatching, @@ -1892,11 +1893,11 @@ export default function HuyaAccountsPage() { title={loginModalTitle} open={passwordLoginResultOpen} onCancel={() => { - if (loginQueuePhase === 'login' || loginQueuePhase === 'wait') return; + if (loginQueueBusy) return; setPasswordLoginResultOpen(false); }} footer={[ - (loginQueuePhase === 'login' || loginQueuePhase === 'wait') ? ( + loginQueueBusy ? ( @@ -1906,7 +1907,6 @@ export default function HuyaAccountsPage() { , ].filter(Boolean)} - maskClosable={loginQueuePhase !== 'login' && loginQueuePhase !== 'wait'} - closable={loginQueuePhase !== 'login' && loginQueuePhase !== 'wait'} + maskClosable={!loginQueueBusy} + closable={!loginQueueBusy} width={860} > { const next = Math.min(30, Math.max(0, Number(value ?? HUYA_LOGIN_DEFAULT_INTERVAL))); setLoginIntervalSeconds(next); @@ -1963,7 +1963,7 @@ export default function HuyaAccountsPage() { 成功 {passwordLoginResults.filter((item) => item.success).length} · 失败 {passwordLoginResults.filter((item) => !item.success).length} - {(loginQueuePhase === 'login' || loginQueuePhase === 'wait') && loginQueueTotal > 0 && ( + {loginQueueBusy && loginQueueTotal > 0 && (