️ improve: webUI improve

This commit is contained in:
MartialBE 2024-04-05 14:12:42 +08:00
parent 1655200376
commit 067668ccae
No known key found for this signature in database
GPG Key ID: F5A7AC860020C896
2 changed files with 30 additions and 23 deletions

View File

@ -554,28 +554,34 @@ const EditModal = ({ open, channelId, onCancel, onOk, groupOptions }) => {
</Container> </Container>
)} )}
<FormControl fullWidth error={Boolean(touched.model_mapping && errors.model_mapping)} sx={{ ...theme.typography.otherInput }}> {inputPrompt.model_mapping && (
{/* <InputLabel htmlFor="channel-model_mapping-label">{inputLabel.model_mapping}</InputLabel> */} <FormControl
<TextField fullWidth
multiline error={Boolean(touched.model_mapping && errors.model_mapping)}
id="channel-model_mapping-label" sx={{ ...theme.typography.otherInput }}
label={inputLabel.model_mapping} >
value={values.model_mapping} {/* <InputLabel htmlFor="channel-model_mapping-label">{inputLabel.model_mapping}</InputLabel> */}
name="model_mapping" <TextField
onBlur={handleBlur} multiline
onChange={handleChange} id="channel-model_mapping-label"
aria-describedby="helper-text-channel-model_mapping-label" label={inputLabel.model_mapping}
minRows={5} value={values.model_mapping}
placeholder={inputPrompt.model_mapping} name="model_mapping"
/> onBlur={handleBlur}
{touched.model_mapping && errors.model_mapping ? ( onChange={handleChange}
<FormHelperText error id="helper-tex-channel-model_mapping-label"> aria-describedby="helper-text-channel-model_mapping-label"
{errors.model_mapping} minRows={5}
</FormHelperText> placeholder={inputPrompt.model_mapping}
) : ( />
<FormHelperText id="helper-tex-channel-model_mapping-label"> {inputPrompt.model_mapping} </FormHelperText> {touched.model_mapping && errors.model_mapping ? (
)} <FormHelperText error id="helper-tex-channel-model_mapping-label">
</FormControl> {errors.model_mapping}
</FormHelperText>
) : (
<FormHelperText id="helper-tex-channel-model_mapping-label"> {inputPrompt.model_mapping} </FormHelperText>
)}
</FormControl>
)}
<FormControl fullWidth error={Boolean(touched.proxy && errors.proxy)} sx={{ ...theme.typography.otherInput }}> <FormControl fullWidth error={Boolean(touched.proxy && errors.proxy)} sx={{ ...theme.typography.otherInput }}>
<InputLabel htmlFor="channel-proxy-label">{inputLabel.proxy}</InputLabel> <InputLabel htmlFor="channel-proxy-label">{inputLabel.proxy}</InputLabel>
<OutlinedInput <OutlinedInput

View File

@ -258,7 +258,8 @@ const typeConfig = {
prompt: { prompt: {
key: '密钥填写midjourney-proxy的密钥如果没有设置密钥可以随便填', key: '密钥填写midjourney-proxy的密钥如果没有设置密钥可以随便填',
base_url: '地址填写midjourney-proxy部署的地址', base_url: '地址填写midjourney-proxy部署的地址',
test_model: '' test_model: '',
model_mapping: ''
}, },
modelGroup: 'Midjourney' modelGroup: 'Midjourney'
} }