Fix: Fixed the issue where the save button at the bottom of the chat page could not be displayed on small screens #3221 (#9596)

### What problem does this PR solve?

Fix: Fixed the issue where the save button at the bottom of the chat
page could not be displayed on small screens #3221

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2025-08-20 15:42:09 +08:00
committed by GitHub
parent 3b218b2dc0
commit c66dbbe433

View File

@ -89,25 +89,28 @@ export function ChatSettings({ switchSettingVisible }: ChatSettingsProps) {
}, [data, form]); }, [data, form]);
return ( return (
<section className="p-5 w-[440px] border-l"> <section className="p-5 w-[440px] border-l flex flex-col">
<div className="flex justify-between items-center text-base pb-2"> <div className="flex justify-between items-center text-base pb-2">
{t('chat.chatSetting')} {t('chat.chatSetting')}
<X className="size-4 cursor-pointer" onClick={switchSettingVisible} /> <X className="size-4 cursor-pointer" onClick={switchSettingVisible} />
</div> </div>
<Form {...form}> <Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit, onInvalid)}> <form
<section className="space-y-6 overflow-auto max-h-[82vh] pr-4"> onSubmit={form.handleSubmit(onSubmit, onInvalid)}
className="flex-1 flex flex-col min-h-0"
>
<section className="space-y-6 overflow-auto flex-1 pr-4 min-h-0">
<ChatBasicSetting></ChatBasicSetting> <ChatBasicSetting></ChatBasicSetting>
<Separator /> <Separator />
<ChatPromptEngine></ChatPromptEngine> <ChatPromptEngine></ChatPromptEngine>
<Separator /> <Separator />
<ChatModelSettings></ChatModelSettings> <ChatModelSettings></ChatModelSettings>
</section> </section>
<div className="space-x-5 text-right"> <div className="space-x-5 text-right pt-4">
<Button variant={'outline'} onClick={switchSettingVisible}> <Button variant={'outline'} onClick={switchSettingVisible}>
{t('chat.cancel')} {t('chat.cancel')}
</Button> </Button>
<ButtonLoading className=" my-4" type="submit" loading={loading}> <ButtonLoading type="submit" loading={loading}>
{t('common.save')} {t('common.save')}
</ButtonLoading> </ButtonLoading>
</div> </div>