style: Centered layout updates across components.
- Centered the 'Add Assistant' popup in the chat modal. - Added centered alignment to the AssistantSettingPopup component. - The text area prompt input field now has a larger height. - Updated the positioning of the Manage Agents popup to be centered. - Added a centered attribute to the AddModelPopup modal footer. - Added centered positioning to ProviderSettings AddProviderPopup. - Centered layout has been added to the SearchContainer.
This commit is contained in:
parent
805a65bbaa
commit
f06d1d4d9a
@ -67,7 +67,7 @@ const PopupContainer: React.FC<Props> = ({ resolve }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
style={{ marginTop: '5vh' }}
|
centered
|
||||||
title={t('chat.add.assistant.title')}
|
title={t('chat.add.assistant.title')}
|
||||||
open={open}
|
open={open}
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
|
|||||||
@ -41,7 +41,8 @@ const AssistantSettingPopupContainer: React.FC<Props> = ({ assistant, resolve })
|
|||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
afterClose={onClose}
|
afterClose={onClose}
|
||||||
transitionName="ant-move-down"
|
transitionName="ant-move-down"
|
||||||
maskTransitionName="ant-fade">
|
maskTransitionName="ant-fade"
|
||||||
|
centered>
|
||||||
<Box mb={8}>{t('common.name')}</Box>
|
<Box mb={8}>{t('common.name')}</Box>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t('common.assistant') + t('common.name')}
|
placeholder={t('common.assistant') + t('common.name')}
|
||||||
|
|||||||
@ -83,14 +83,14 @@ const PopupContainer: React.FC<Props> = ({ agent, resolve }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
style={{ marginTop: '10vh' }}
|
|
||||||
title={agent ? t('agents.edit.title') : t('agents.add.title')}
|
title={agent ? t('agents.edit.title') : t('agents.add.title')}
|
||||||
open={open}
|
open={open}
|
||||||
onOk={() => formRef.current?.submit()}
|
onOk={() => formRef.current?.submit()}
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
afterClose={onClose}
|
afterClose={onClose}
|
||||||
okText={agent ? t('common.save') : t('agents.add.button')}>
|
okText={agent ? t('common.save') : t('agents.add.button')}
|
||||||
|
centered>
|
||||||
<Form
|
<Form
|
||||||
ref={formRef}
|
ref={formRef}
|
||||||
form={form}
|
form={form}
|
||||||
@ -108,7 +108,7 @@ const PopupContainer: React.FC<Props> = ({ agent, resolve }) => {
|
|||||||
<Input placeholder={t('agents.add.name.placeholder')} spellCheck={false} allowClear />
|
<Input placeholder={t('agents.add.name.placeholder')} spellCheck={false} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="prompt" label={t('agents.add.prompt')} rules={[{ required: true }]}>
|
<Form.Item name="prompt" label={t('agents.add.prompt')} rules={[{ required: true }]}>
|
||||||
<TextArea placeholder={t('agents.add.prompt.placeholder')} spellCheck={false} rows={4} />
|
<TextArea placeholder={t('agents.add.prompt.placeholder')} spellCheck={false} rows={10} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@ -35,13 +35,13 @@ const PopupContainer: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
style={{ marginTop: '10vh' }}
|
|
||||||
title={t('agents.manage.title')}
|
title={t('agents.manage.title')}
|
||||||
open={open}
|
open={open}
|
||||||
onOk={onOk}
|
onOk={onOk}
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
afterClose={onClose}
|
afterClose={onClose}
|
||||||
footer={null}>
|
footer={null}
|
||||||
|
centered>
|
||||||
<Container>
|
<Container>
|
||||||
{agents.length > 0 && (
|
{agents.length > 0 && (
|
||||||
<DragableList list={agents} onUpdate={updateAgents}>
|
<DragableList list={agents} onUpdate={updateAgents}>
|
||||||
|
|||||||
@ -67,7 +67,8 @@ const PopupContainer: React.FC<Props> = ({ title, provider, resolve }) => {
|
|||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
afterClose={onClose}
|
afterClose={onClose}
|
||||||
footer={null}>
|
footer={null}
|
||||||
|
centered>
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
labelCol={{ flex: '110px' }}
|
labelCol={{ flex: '110px' }}
|
||||||
|
|||||||
@ -38,6 +38,7 @@ const PopupContainer: React.FC<Props> = ({ provider, resolve }) => {
|
|||||||
afterClose={onClose}
|
afterClose={onClose}
|
||||||
width={360}
|
width={360}
|
||||||
closable={false}
|
closable={false}
|
||||||
|
centered
|
||||||
title={t('settings.provider.edit.name')}
|
title={t('settings.provider.edit.name')}
|
||||||
okButtonProps={{ disabled: buttonDisabled }}>
|
okButtonProps={{ disabled: buttonDisabled }}>
|
||||||
<Input
|
<Input
|
||||||
|
|||||||
@ -107,7 +107,8 @@ const PopupContainer: React.FC<Props> = ({ provider: _provider, resolve }) => {
|
|||||||
styles={{
|
styles={{
|
||||||
content: { padding: 0 },
|
content: { padding: 0 },
|
||||||
header: { padding: 22, paddingBottom: 15 }
|
header: { padding: 22, paddingBottom: 15 }
|
||||||
}}>
|
}}
|
||||||
|
centered>
|
||||||
<SearchContainer>
|
<SearchContainer>
|
||||||
<Search placeholder={t('settings.provider.search_placeholder')} allowClear onSearch={setSearchText} />
|
<Search placeholder={t('settings.provider.search_placeholder')} allowClear onSearch={setSearchText} />
|
||||||
</SearchContainer>
|
</SearchContainer>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user