Skip to content

Commit

Permalink
feat: add Account ID input field for specific channel type and preven…
Browse files Browse the repository at this point in the history
…t potential bug with undefined key
  • Loading branch information
songquanpeng committed Feb 2, 2025
1 parent 15c27e4 commit 1dc255c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web/default/src/pages/Channel/EditChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ const EditChannel = () => {
return;
}
let localInputs = { ...inputs };
if (localInputs.key === 'undefined|undefined|undefined') {
localInputs.key = ''; // prevent potential bug
}
if (localInputs.base_url && localInputs.base_url.endsWith('/')) {
localInputs.base_url = localInputs.base_url.slice(
0,
Expand Down Expand Up @@ -622,6 +625,21 @@ const EditChannel = () => {
/>
</Form.Field>
))}
{inputs.type === 37 && (
<Form.Field>
<Form.Input
label='Account ID'
name='user_id'
required
placeholder={
'请输入 Account ID,例如:d8d7c61dbc334c32d3ced580e4bf42b4'
}
onChange={handleConfigChange}
value={config.user_id}
autoComplete=''
/>
</Form.Field>
)}
{inputs.type !== 33 && !isEdit && (
<Form.Checkbox
checked={batch}
Expand Down

0 comments on commit 1dc255c

Please sign in to comment.