From 9afc3e982a2518c1fc7636fe7a4e6f4a12e5f197 Mon Sep 17 00:00:00 2001 From: zhujiruo Date: Wed, 2 Jul 2025 16:12:03 +0800 Subject: [PATCH] refactor(web): Restructure the operation buttons layout in the app information component (#21742) - Display the import DSL and switch app buttons directly on the interface, no longer hiding them in the more options menu --- web/app/components/app-sidebar/app-info.tsx | 73 ++++++++------------- 1 file changed, 28 insertions(+), 45 deletions(-) diff --git a/web/app/components/app-sidebar/app-info.tsx b/web/app/components/app-sidebar/app-info.tsx index c6d0e776dd..1767b02cd8 100644 --- a/web/app/components/app-sidebar/app-info.tsx +++ b/web/app/components/app-sidebar/app-info.tsx @@ -10,7 +10,6 @@ import { RiFileCopy2Line, RiFileDownloadLine, RiFileUploadLine, - RiMoreLine, } from '@remixicon/react' import AppIcon from '../base/app-icon' import SwitchAppModal from '../app/switch-app-modal' @@ -35,7 +34,6 @@ import ContentDialog from '@/app/components/base/content-dialog' import Button from '@/app/components/base/button' import CardView from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView' import Divider from '../base/divider' -import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '../base/portal-to-follow-elem' export type IAppInfoProps = { expand: boolean @@ -186,11 +184,6 @@ const AppInfo = ({ expand, onlyShowDetail = false, openState = false, onDetailEx const { isCurrentWorkspaceEditor } = useAppContext() - const [showMore, setShowMore] = useState(false) - const handleTriggerMore = useCallback(() => { - setShowMore(true) - }, [setShowMore]) - if (!appDetail) return null @@ -294,52 +287,42 @@ const AppInfo = ({ expand, onlyShowDetail = false, openState = false, onDetailEx {t('app.export')} - {appDetail.mode !== 'agent-chat' && - - - - -
- { - (appDetail.mode === 'advanced-chat' || appDetail.mode === 'workflow') - &&
+ { + (appDetail.mode === 'advanced-chat' || appDetail.mode === 'workflow') + &&
- } - { - (appDetail.mode === 'completion' || appDetail.mode === 'chat') - &&
+ + {t('workflow.common.importDSL')} + + } + { + (appDetail.mode === 'completion' || appDetail.mode === 'chat') + &&
- } -
-
-
} + }} + > + + {t('app.switch')} + + } + + }