Skip to content

Commit 1dc255c

Browse files
committed
feat: add Account ID input field for specific channel type and prevent potential bug with undefined key
1 parent 15c27e4 commit 1dc255c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

web/default/src/pages/Channel/EditChannel.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ const EditChannel = () => {
207207
return;
208208
}
209209
let localInputs = { ...inputs };
210+
if (localInputs.key === 'undefined|undefined|undefined') {
211+
localInputs.key = ''; // prevent potential bug
212+
}
210213
if (localInputs.base_url && localInputs.base_url.endsWith('/')) {
211214
localInputs.base_url = localInputs.base_url.slice(
212215
0,
@@ -622,6 +625,21 @@ const EditChannel = () => {
622625
/>
623626
</Form.Field>
624627
))}
628+
{inputs.type === 37 && (
629+
<Form.Field>
630+
<Form.Input
631+
label='Account ID'
632+
name='user_id'
633+
required
634+
placeholder={
635+
'请输入 Account ID,例如:d8d7c61dbc334c32d3ced580e4bf42b4'
636+
}
637+
onChange={handleConfigChange}
638+
value={config.user_id}
639+
autoComplete=''
640+
/>
641+
</Form.Field>
642+
)}
625643
{inputs.type !== 33 && !isEdit && (
626644
<Form.Checkbox
627645
checked={batch}

0 commit comments

Comments
 (0)