diff --git a/src/App.tsx b/src/App.tsx index c658f0db7..3388f3c5a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -299,78 +299,92 @@ function App() { }; const renderContent = () => { - switch (currentView) { - case "settings": - return ( - setCurrentView("providers")} - onImportSuccess={handleImportSuccess} - /> - ); - case "prompts": - return ( - setCurrentView("providers")} - appId={activeApp} - /> - ); - case "skills": - return ( - setCurrentView("providers")} - initialApp={activeApp} - /> - ); - case "mcp": - return ( - setCurrentView("providers")} - /> - ); - case "agents": - return setCurrentView("providers")} />; - default: - return ( -
- {/* 独立滚动容器 - 解决 Linux/Ubuntu 下 DndContext 与滚轮事件冲突 */} -
- - - setIsAddOpen(true)} - /> - - + const content = (() => { + switch (currentView) { + case "settings": + return ( + setCurrentView("providers")} + onImportSuccess={handleImportSuccess} + /> + ); + case "prompts": + return ( + setCurrentView("providers")} + appId={activeApp} + /> + ); + case "skills": + return ( + setCurrentView("providers")} + initialApp={activeApp} + /> + ); + case "mcp": + return ( + setCurrentView("providers")} + /> + ); + case "agents": + return setCurrentView("providers")} />; + default: + return ( +
+ {/* 独立滚动容器 - 解决 Linux/Ubuntu 下 DndContext 与滚轮事件冲突 */} +
+ + + setIsAddOpen(true)} + /> + + +
-
- ); - } + ); + } + })(); + + return ( + + + {content} + + + ); }; return ( diff --git a/src/components/common/FullScreenPanel.tsx b/src/components/common/FullScreenPanel.tsx index 56e3cab3a..edf3a1555 100644 --- a/src/components/common/FullScreenPanel.tsx +++ b/src/components/common/FullScreenPanel.tsx @@ -1,5 +1,6 @@ import React from "react"; import { createPortal } from "react-dom"; +import { motion } from "framer-motion"; import { ArrowLeft } from "lucide-react"; import { Button } from "@/components/ui/button"; @@ -35,7 +36,10 @@ export const FullScreenPanel: React.FC = ({ if (!isOpen) return null; return createPortal( -
@@ -71,7 +75,7 @@ export const FullScreenPanel: React.FC = ({
)} - , + , document.body, ); };