Revert "Integrate Plus hosted session binding"

This reverts commit 3aa9b136d3.
This commit is contained in:
QLHazyCoder
2026-05-20 08:05:25 +08:00
parent 3aa9b136d3
commit f36e0cedb3
20 changed files with 148 additions and 850 deletions
+1 -1
View File
@@ -320,7 +320,7 @@
<option value="cpa_codex_session">导入当前 ChatGPT 会话到 CPA</option>
<option value="sub2api_codex_session">导入当前 ChatGPT 会话到 SUB2API</option>
</select>
<span class="setting-caption" id="plus-account-access-strategy-caption">Plus 模式未启用</span>
<span class="setting-caption" id="plus-account-access-strategy-caption">当前来源仅支持 OAuth</span>
</div>
</div>
<div class="data-row" id="row-plus-payment-method" style="display:none;">
+26 -3
View File
@@ -555,7 +555,7 @@ const DEFAULT_PLUS_PAYMENT_METHOD = PLUS_PAYMENT_METHOD_PAYPAL;
const PLUS_ACCOUNT_ACCESS_STRATEGY_OAUTH = 'oauth';
const PLUS_ACCOUNT_ACCESS_STRATEGY_SUB2API_CODEX_SESSION = 'sub2api_codex_session';
const PLUS_ACCOUNT_ACCESS_STRATEGY_CPA_CODEX_SESSION = 'cpa_codex_session';
const DEFAULT_PLUS_ACCOUNT_ACCESS_STRATEGY = PLUS_ACCOUNT_ACCESS_STRATEGY_SUB2API_CODEX_SESSION;
const DEFAULT_PLUS_ACCOUNT_ACCESS_STRATEGY = PLUS_ACCOUNT_ACCESS_STRATEGY_OAUTH;
const SIGNUP_METHOD_EMAIL = 'email';
const SIGNUP_METHOD_PHONE = 'phone';
const DEFAULT_SIGNUP_METHOD = SIGNUP_METHOD_EMAIL;
@@ -9312,8 +9312,31 @@ function updatePlusModeUI() {
selectPlusAccountAccessStrategy.setAttribute('aria-disabled', String(selectPlusAccountAccessStrategy.disabled));
}
if (typeof plusAccountAccessStrategyCaption !== 'undefined' && plusAccountAccessStrategyCaption) {
plusAccountAccessStrategyCaption.textContent = !enabled
? 'Plus 模式未启用'
if (!enabled) {
plusAccountAccessStrategyCaption.textContent = '当前来源仅支持 OAuth';
} else if (!canEditPlusAccountAccessStrategy) {
plusAccountAccessStrategyCaption.textContent = '当前来源仅支持 OAuth';
} else if (effectivePlusAccountAccessStrategy === sub2apiSessionStrategyValue) {
plusAccountAccessStrategyCaption.textContent = '复用当前 Plus 已登录会话,直接导入到 SUB2API';
} else if (effectivePlusAccountAccessStrategy === oauthStrategyValue) {
plusAccountAccessStrategyCaption.textContent = '通过 OAuth 回调创建 SUB2API 账号';
} else {
plusAccountAccessStrategyCaption.textContent = '当前来源仅支持 OAuth';
}
}
if (typeof plusAccountAccessStrategyCaption !== 'undefined' && plusAccountAccessStrategyCaption) {
if (!enabled || !canEditPlusAccountAccessStrategy) {
plusAccountAccessStrategyCaption.textContent = '当前来源仅支持 OAuth';
} else {
plusAccountAccessStrategyCaption.textContent = describePlusAccountAccessStrategy(
effectivePlusAccountAccessStrategy,
effectiveTargetId
);
}
}
if (typeof plusAccountAccessStrategyCaption !== 'undefined' && plusAccountAccessStrategyCaption) {
plusAccountAccessStrategyCaption.textContent = !enabled || !canEditPlusAccountAccessStrategy
? '当前来源仅支持 OAuth'
: describePlusAccountAccessStrategy(
effectivePlusAccountAccessStrategy,
effectiveTargetId