重构 OAuth 总超时为 CPA 来源专属策略

This commit is contained in:
QLHazyCoder
2026-05-24 20:53:32 +08:00
parent 3a60560e27
commit a1793334db
21 changed files with 111 additions and 88 deletions
-11
View File
@@ -2231,17 +2231,6 @@ header {
text-align: center;
}
.oauth-flow-timeout-setting {
gap: 8px;
min-width: 0;
}
.oauth-flow-timeout-caption {
min-width: 0 !important;
overflow: hidden;
text-overflow: ellipsis;
}
.setting-caption-left {
text-align: left;
}
-16
View File
@@ -728,22 +728,6 @@
</div>
</div>
</div>
<div class="data-row" id="row-oauth-flow-timeout">
<span class="data-label">授权总超时</span>
<div class="data-inline setting-pair">
<div class="setting-group setting-group-primary oauth-flow-timeout-setting">
<label class="toggle-switch" for="input-oauth-flow-timeout-enabled"
title="关闭后不再用 5 分钟总预算重启授权链,但页面、点击、回调等本地等待超时仍会生效">
<input type="checkbox" id="input-oauth-flow-timeout-enabled" checked />
<span class="toggle-switch-track" aria-hidden="true">
<span class="toggle-switch-thumb"></span>
</span>
<span>启用</span>
</label>
<span class="setting-caption oauth-flow-timeout-caption">关闭后只取消 Step 7 后链总预算</span>
</div>
</div>
</div>
<div class="data-row" id="row-step-execution-range">
<span class="data-label">执行范围</span>
<div class="data-inline setting-pair step-execution-range-setting">
-12
View File
@@ -429,7 +429,6 @@ const inputAutoSkipFailures = document.getElementById('input-auto-skip-failures'
const inputAutoSkipFailuresThreadIntervalMinutes = document.getElementById('input-auto-skip-failures-thread-interval-minutes');
const inputStep6CookieCleanupEnabled = document.getElementById('input-step6-cookie-cleanup-enabled');
const inputAutoStepDelaySeconds = document.getElementById('input-auto-step-delay-seconds');
const inputOAuthFlowTimeoutEnabled = document.getElementById('input-oauth-flow-timeout-enabled');
const rowStepExecutionRange = document.getElementById('row-step-execution-range');
const inputStepExecutionRangeEnabled = document.getElementById('input-step-execution-range-enabled');
const inputStepExecutionRangeFrom = document.getElementById('input-step-execution-range-from');
@@ -5119,9 +5118,6 @@ function collectSettingsPayload() {
? buildStepExecutionRangeByFlowPayload(latestState?.stepExecutionRangeByFlow)
: (latestState?.stepExecutionRangeByFlow || {}),
autoStepDelaySeconds: normalizeAutoStepDelaySeconds(inputAutoStepDelaySeconds.value),
oauthFlowTimeoutEnabled: typeof inputOAuthFlowTimeoutEnabled !== 'undefined' && inputOAuthFlowTimeoutEnabled
? Boolean(inputOAuthFlowTimeoutEnabled.checked)
: true,
phoneVerificationEnabled: effectivePhoneVerificationEnabled,
signupMethod: effectiveSignupMethod,
phoneSignupReloginAfterBindEmailEnabled: typeof inputPhoneSignupReloginAfterBindEmail !== 'undefined' && inputPhoneSignupReloginAfterBindEmail
@@ -11374,11 +11370,6 @@ function applySettingsState(state) {
inputStep6CookieCleanupEnabled.checked = Boolean(state?.step6CookieCleanupEnabled);
}
inputAutoStepDelaySeconds.value = formatAutoStepDelayInputValue(state?.autoStepDelaySeconds);
if (typeof inputOAuthFlowTimeoutEnabled !== 'undefined' && inputOAuthFlowTimeoutEnabled) {
inputOAuthFlowTimeoutEnabled.checked = state?.oauthFlowTimeoutEnabled !== undefined
? Boolean(state.oauthFlowTimeoutEnabled)
: true;
}
if (inputVerificationResendCount) {
const restoredVerificationResendCount = state?.verificationResendCount !== undefined
? state.verificationResendCount
@@ -17849,9 +17840,6 @@ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
if (message.payload.autoStepDelaySeconds !== undefined) {
inputAutoStepDelaySeconds.value = formatAutoStepDelayInputValue(message.payload.autoStepDelaySeconds);
}
if (message.payload.oauthFlowTimeoutEnabled !== undefined && typeof inputOAuthFlowTimeoutEnabled !== 'undefined' && inputOAuthFlowTimeoutEnabled) {
inputOAuthFlowTimeoutEnabled.checked = Boolean(message.payload.oauthFlowTimeoutEnabled);
}
if (
(
message.payload.verificationResendCount !== undefined