From f55ff590d7296df63a21be51ba68d2039c44bb17 Mon Sep 17 00:00:00 2001 From: balibabu Date: Wed, 20 Aug 2025 10:30:08 +0800 Subject: [PATCH] Fix: Fixed the issue where the model configuration page could not be scrolled #9572 (#9579) ### What problem does this PR solve? Fix: Fixed the issue where the model configuration page could not be scrolled #9572 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- .../chat-configuration-modal/assistant-setting.tsx | 2 +- web/src/pages/chat/constants.ts | 6 ------ .../next-chats/chat/app-settings/chat-settings.tsx | 2 +- web/src/pages/next-chats/constants.ts | 6 ------ web/src/pages/user-setting/index.less | 1 - web/src/pages/user-setting/index.tsx | 13 +++++++------ web/src/pages/user-setting/sidebar/index.less | 1 - 7 files changed, 9 insertions(+), 22 deletions(-) diff --git a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx index 500f2359e..1e955c100 100644 --- a/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx +++ b/web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx @@ -8,7 +8,7 @@ import classNames from 'classnames'; import { useCallback } from 'react'; import { ISegmentedContentProps } from '../interface'; -import { DatasetMetadata } from '../constants'; +import { DatasetMetadata } from '@/constants/chat'; import styles from './index.less'; import { MetadataFilterConditions } from './metadata-filter-conditions'; diff --git a/web/src/pages/chat/constants.ts b/web/src/pages/chat/constants.ts index ed0dcb514..8c9a965f4 100644 --- a/web/src/pages/chat/constants.ts +++ b/web/src/pages/chat/constants.ts @@ -1,7 +1 @@ export const EmptyConversationId = 'empty'; - -export enum DatasetMetadata { - Disabled = 'disabled', - Automatic = 'automatic', - Manual = 'manual', -} diff --git a/web/src/pages/next-chats/chat/app-settings/chat-settings.tsx b/web/src/pages/next-chats/chat/app-settings/chat-settings.tsx index 5ae645bd5..f9deb7975 100644 --- a/web/src/pages/next-chats/chat/app-settings/chat-settings.tsx +++ b/web/src/pages/next-chats/chat/app-settings/chat-settings.tsx @@ -1,6 +1,7 @@ import { Button, ButtonLoading } from '@/components/ui/button'; import { Form } from '@/components/ui/form'; import { Separator } from '@/components/ui/separator'; +import { DatasetMetadata } from '@/constants/chat'; import { useFetchDialog, useSetDialog } from '@/hooks/use-chat-request'; import { transformBase64ToFile, transformFile2Base64 } from '@/utils/file-util'; import { @@ -14,7 +15,6 @@ import { useForm } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; import { useParams } from 'umi'; import { z } from 'zod'; -import { DatasetMetadata } from '../../constants'; import ChatBasicSetting from './chat-basic-settings'; import { ChatModelSettings } from './chat-model-settings'; import { ChatPromptEngine } from './chat-prompt-engine'; diff --git a/web/src/pages/next-chats/constants.ts b/web/src/pages/next-chats/constants.ts index ed0dcb514..8c9a965f4 100644 --- a/web/src/pages/next-chats/constants.ts +++ b/web/src/pages/next-chats/constants.ts @@ -1,7 +1 @@ export const EmptyConversationId = 'empty'; - -export enum DatasetMetadata { - Disabled = 'disabled', - Automatic = 'automatic', - Manual = 'manual', -} diff --git a/web/src/pages/user-setting/index.less b/web/src/pages/user-setting/index.less index baae0eebb..81554148e 100644 --- a/web/src/pages/user-setting/index.less +++ b/web/src/pages/user-setting/index.less @@ -2,7 +2,6 @@ width: 100%; .outletWrapper { - padding: 32px 32px 0; height: 100%; overflow-y: auto; } diff --git a/web/src/pages/user-setting/index.tsx b/web/src/pages/user-setting/index.tsx index d5871f177..7fa104431 100644 --- a/web/src/pages/user-setting/index.tsx +++ b/web/src/pages/user-setting/index.tsx @@ -1,4 +1,3 @@ -import { Flex } from 'antd'; import { Outlet } from 'umi'; import SideBar from './sidebar'; @@ -22,7 +21,7 @@ const UserSetting = () => { const { navigateToHome } = useNavigatePage(); return ( -
+
@@ -38,12 +37,14 @@ const UserSetting = () => { - +
- +
- - +
+
); }; diff --git a/web/src/pages/user-setting/sidebar/index.less b/web/src/pages/user-setting/sidebar/index.less index 42f3204d0..16777e579 100644 --- a/web/src/pages/user-setting/sidebar/index.less +++ b/web/src/pages/user-setting/sidebar/index.less @@ -1,5 +1,4 @@ .sideBarWrapper { - padding-top: 32px; .version { color: rgb(17, 206, 17); }