Reorder Plus access strategy setting
This commit is contained in:
@@ -336,7 +336,7 @@
|
|||||||
'openai-plus': {
|
'openai-plus': {
|
||||||
id: 'openai-plus',
|
id: 'openai-plus',
|
||||||
label: 'Plus',
|
label: 'Plus',
|
||||||
rowIds: ['row-plus-mode', 'row-plus-payment-method', 'row-plus-account-access-strategy'],
|
rowIds: ['row-plus-mode', 'row-plus-account-access-strategy', 'row-plus-payment-method'],
|
||||||
},
|
},
|
||||||
'openai-phone': {
|
'openai-phone': {
|
||||||
id: 'openai-phone',
|
id: 'openai-phone',
|
||||||
|
|||||||
+10
-10
@@ -301,6 +301,16 @@
|
|||||||
<span class="setting-caption">Plus 订阅链路</span>
|
<span class="setting-caption">Plus 订阅链路</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="data-row" id="row-plus-account-access-strategy" style="display:none;">
|
||||||
|
<span class="data-label">账号接入策略</span>
|
||||||
|
<div class="data-inline">
|
||||||
|
<select id="select-plus-account-access-strategy" class="data-select">
|
||||||
|
<option value="oauth">OAuth</option>
|
||||||
|
<option value="sub2api_codex_session">导入当前 ChatGPT 会话到 SUB2API</option>
|
||||||
|
</select>
|
||||||
|
<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;">
|
<div class="data-row" id="row-plus-payment-method" style="display:none;">
|
||||||
<span class="data-label">Plus 支付</span>
|
<span class="data-label">Plus 支付</span>
|
||||||
<div class="data-inline">
|
<div class="data-inline">
|
||||||
@@ -313,16 +323,6 @@
|
|||||||
<span class="setting-caption" id="plus-payment-method-caption">PayPal 订阅链路</span>
|
<span class="setting-caption" id="plus-payment-method-caption">PayPal 订阅链路</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="data-row" id="row-plus-account-access-strategy" style="display:none;">
|
|
||||||
<span class="data-label">账号接入策略</span>
|
|
||||||
<div class="data-inline">
|
|
||||||
<select id="select-plus-account-access-strategy" class="data-select">
|
|
||||||
<option value="oauth">OAuth</option>
|
|
||||||
<option value="sub2api_codex_session">导入当前 ChatGPT 会话到 SUB2API</option>
|
|
||||||
</select>
|
|
||||||
<span class="setting-caption" id="plus-account-access-strategy-caption">当前来源仅支持 OAuth</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="data-row" id="row-paypal-account" style="display:none;">
|
<div class="data-row" id="row-paypal-account" style="display:none;">
|
||||||
<span class="data-label">PayPal 账号</span>
|
<span class="data-label">PayPal 账号</span>
|
||||||
<div class="data-inline">
|
<div class="data-inline">
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ test('flow registry exposes canonical flow and target metadata', () => {
|
|||||||
);
|
);
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
flowRegistry.getSettingsGroupDefinition('openai-plus')?.rowIds,
|
flowRegistry.getSettingsGroupDefinition('openai-plus')?.rowIds,
|
||||||
['row-plus-mode', 'row-plus-payment-method', 'row-plus-account-access-strategy']
|
['row-plus-mode', 'row-plus-account-access-strategy', 'row-plus-payment-method']
|
||||||
);
|
);
|
||||||
assert.equal(flowRegistry.getPublicationTargetDefinition('kiro', 'kiro-rs')?.label, 'kiro.rs');
|
assert.equal(flowRegistry.getPublicationTargetDefinition('kiro', 'kiro-rs')?.label, 'kiro.rs');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,8 +20,14 @@ test('sidepanel loads reusable form dialog and paypal manager before sidepanel b
|
|||||||
|
|
||||||
test('sidepanel html contains paypal select and GoPay controls', () => {
|
test('sidepanel html contains paypal select and GoPay controls', () => {
|
||||||
const html = fs.readFileSync('sidepanel/sidepanel.html', 'utf8');
|
const html = fs.readFileSync('sidepanel/sidepanel.html', 'utf8');
|
||||||
|
const plusAccountAccessStrategyIndex = html.indexOf('id="row-plus-account-access-strategy"');
|
||||||
|
const plusPaymentMethodIndex = html.indexOf('id="row-plus-payment-method"');
|
||||||
|
|
||||||
assert.match(html, /id="row-plus-payment-method"/);
|
assert.match(html, /id="row-plus-payment-method"/);
|
||||||
|
assert.match(html, /id="row-plus-account-access-strategy"/);
|
||||||
|
assert.notEqual(plusAccountAccessStrategyIndex, -1);
|
||||||
|
assert.notEqual(plusPaymentMethodIndex, -1);
|
||||||
|
assert.ok(plusAccountAccessStrategyIndex < plusPaymentMethodIndex);
|
||||||
assert.match(html, /id="select-plus-payment-method"/);
|
assert.match(html, /id="select-plus-payment-method"/);
|
||||||
assert.match(html, /id="row-paypal-account"/);
|
assert.match(html, /id="row-paypal-account"/);
|
||||||
assert.match(html, /id="select-paypal-account"/);
|
assert.match(html, /id="select-paypal-account"/);
|
||||||
|
|||||||
Reference in New Issue
Block a user