diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index b97c6c8..c62274d 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -13,7 +13,6 @@ import { useAgentStore } from './store/agentStore'; import { useMarketStore } from './store/marketStore'; import { usePortfolioStore } from './store/portfolioStore'; import { useRuntimeStore } from './store/runtimeStore'; -import { useOpenClawStore } from './store/openclawStore'; import { useUIStore } from './store/uiStore'; const EDITABLE_AGENT_WORKSPACE_FILES = [ @@ -139,11 +138,6 @@ export default function LiveTradingApp() { addSystemMessage, }); - // Make clientRef available to OpenClaw panel via store - useEffect(() => { - useOpenClawStore.getState().setClientRef(clientRef); - }, [clientRef]); - const runtimeControls = useRuntimeControls({ clientRef, currentTickers: tickers, diff --git a/frontend/src/components/AppShell.jsx b/frontend/src/components/AppShell.jsx index 3387d0b..7c7fab2 100644 --- a/frontend/src/components/AppShell.jsx +++ b/frontend/src/components/AppShell.jsx @@ -13,7 +13,6 @@ const AgentFeed = lazy(() => import('./AgentFeed')); const StatisticsView = lazy(() => import('./StatisticsView')); const StockExplainView = lazy(() => import('./StockExplainView.jsx')); const TraderView = lazy(() => import('./TraderView.jsx')); -const OpenClawView = lazy(() => import('./OpenClawView.jsx')); function ViewLoadingFallback({ label = '加载中...' }) { return ( @@ -137,6 +136,12 @@ export default function AppShell({ const { setIsRuntimeSettingsOpen, setIsWatchlistPanelOpen } = useRuntimeStore(); const { setChartTab, setCurrentView, setIsResizing, setLeftWidth } = useUIStore(); + useEffect(() => { + if (currentView === 'openclaw') { + setCurrentView('statistics'); + } + }, [currentView, setCurrentView]); + // Resize handler useEffect(() => { if (!isResizing) return; @@ -172,7 +177,7 @@ export default function AppShell({ currentView === 'room' ? 'show-room' : currentView === 'explain' ? 'show-explain' : currentView === 'chart' ? 'show-chart' : - currentView === 'statistics' ? 'show-statistics' : 'show-openclaw'}`; + 'show-statistics'}`; return base; }, [currentView]); @@ -382,12 +387,6 @@ export default function AppShell({ > 统计 -
@@ -491,13 +490,6 @@ export default function AppShell({ />
- - {/* OpenClaw View Panel */} -
- }> - - -
diff --git a/frontend/src/store/uiStore.js b/frontend/src/store/uiStore.js index 3c2a582..721b377 100644 --- a/frontend/src/store/uiStore.js +++ b/frontend/src/store/uiStore.js @@ -9,7 +9,7 @@ const resolveValue = (updater, currentValue) => ( */ export const useUIStore = create((set) => ({ // Current view - currentView: 'traders', // 'traders' | 'room' | 'explain' | 'chart' | 'statistics' | 'openclaw' | 'runtime' + currentView: 'traders', // 'traders' | 'room' | 'explain' | 'chart' | 'statistics' | 'runtime' setCurrentView: (currentView) => set((state) => ({ currentView: resolveValue(currentView, state.currentView) })), // Chart tab diff --git a/frontend/src/styles/GlobalStyles.jsx b/frontend/src/styles/GlobalStyles.jsx index 38c019e..e93515e 100644 --- a/frontend/src/styles/GlobalStyles.jsx +++ b/frontend/src/styles/GlobalStyles.jsx @@ -1098,10 +1098,6 @@ export default function GlobalStyles() { transform: translateX(-80%); } - .view-slider-five.show-openclaw { - transform: translateX(-100%); - } - .view-panel { flex: 0 0 33.333%; width: 33.333%;