feat: 移除CPA回调相关逻辑,固定为步骤9,更新文档以反映新流程

This commit is contained in:
祁连海
2026-04-17 23:38:47 +08:00
parent a4c7849a0f
commit 61a3bb3461
12 changed files with 1 additions and 141 deletions
-7
View File
@@ -4,7 +4,6 @@
function createNavigationUtils(deps = {}) {
const {
DEFAULT_SUB2API_URL,
normalizeCpaCallbackMode,
normalizeLocalCpaStep9Mode,
} = deps;
@@ -90,11 +89,6 @@
&& isLocalCpaUrl(state?.vpsUrl);
}
function shouldSkipLoginVerificationForCpaCallback(state) {
return getPanelMode(state) === 'cpa'
&& normalizeCpaCallbackMode(state?.cpaCallbackMode) === 'step7';
}
function matchesSourceUrlFamily(source, candidateUrl, referenceUrl) {
const candidate = parseUrlSafely(candidateUrl);
if (!candidate) return false;
@@ -169,7 +163,6 @@
normalizeSub2ApiUrl,
parseUrlSafely,
shouldBypassStep9ForLocalCpa,
shouldSkipLoginVerificationForCpaCallback,
};
}
-12
View File
@@ -22,7 +22,6 @@
reuseOrCreateTab,
setState,
setStepStatus,
shouldSkipLoginVerificationForCpaCallback,
shouldUseCustomRegistrationEmail,
sleepWithStop,
STANDARD_MAIL_VERIFICATION_RESEND_INTERVAL_MS,
@@ -127,17 +126,6 @@
}
async function executeStep8(state) {
if (shouldSkipLoginVerificationForCpaCallback(state)) {
await setState({
lastLoginCode: null,
loginVerificationRequestedAt: null,
oauthFlowDeadlineAt: null,
});
await setStepStatus(8, 'skipped');
await addLog('步骤 8:当前已选择“第七步回调”,本轮无需获取登录验证码。', 'warn');
return;
}
let currentState = state;
let mailPollingAttempt = 1;
let lastMailPollingError = null;
-6
View File
@@ -14,18 +14,12 @@
refreshOAuthUrlBeforeStep6,
reuseOrCreateTab,
sendToContentScriptResilient,
shouldSkipLoginVerificationForCpaCallback,
skipLoginVerificationStepsForCpaCallback,
startOAuthFlowTimeoutWindow,
STEP6_MAX_ATTEMPTS,
throwIfStopped,
} = deps;
async function executeStep7(state) {
if (shouldSkipLoginVerificationForCpaCallback(state)) {
await skipLoginVerificationStepsForCpaCallback();
return;
}
if (!state.email) {
throw new Error('缺少邮箱地址,请先完成步骤 3。');
}