fix(web): keep Add model dialog footer visible when form overflows (#35490)

This commit is contained in:
Crazywoola 2026-04-22 16:54:23 +08:00 committed by GitHub
parent 8b1533438f
commit 491061b8f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -295,15 +295,15 @@ const ModelModal: FC<ModelModalProps> = ({
<Dialog open onOpenChange={handleOpenChange}>
<DialogContent
backdropProps={{ forceRender: true }}
className="w-[640px] max-w-[640px] overflow-hidden p-0"
className="flex w-[640px] max-w-[640px] flex-col overflow-hidden p-0"
>
<DialogCloseButton className="top-5 right-5 h-8 w-8" />
<div className="p-6 pb-3">
<div className="shrink-0 p-6 pb-3">
{modalTitle}
{modalDesc}
{modalModel}
</div>
<div className="max-h-[calc(100vh-320px)] overflow-y-auto px-6 py-3">
<div className="min-h-0 flex-1 overflow-y-auto px-6 py-3">
{
mode === ModelModalModeEnum.configCustomModel && (
<AuthForm
@ -365,7 +365,7 @@ const ModelModal: FC<ModelModalProps> = ({
)
}
</div>
<div className="flex justify-between p-6 pt-5">
<div className="flex shrink-0 justify-between p-6 pt-5">
{
(provider.help && (provider.help.title || provider.help.url))
? (
@ -410,7 +410,7 @@ const ModelModal: FC<ModelModalProps> = ({
</div>
{
(mode === ModelModalModeEnum.configCustomModel || mode === ModelModalModeEnum.configProviderCredential) && (
<div className="border-t-[0.5px] border-t-divider-regular">
<div className="shrink-0 border-t-[0.5px] border-t-divider-regular">
<div className="flex items-center justify-center rounded-b-2xl bg-background-section-burn py-3 text-xs text-text-tertiary">
<Lock01 className="mr-1 h-3 w-3 text-text-tertiary" />
{t('modelProvider.encrypted.front', { ns: 'common' })}