Remove OpenClaw page from frontend

This commit is contained in:
2026-03-28 22:24:19 +08:00
parent 4295293a21
commit 346208dc2b
4 changed files with 8 additions and 26 deletions

View File

@@ -13,7 +13,6 @@ import { useAgentStore } from './store/agentStore';
import { useMarketStore } from './store/marketStore'; import { useMarketStore } from './store/marketStore';
import { usePortfolioStore } from './store/portfolioStore'; import { usePortfolioStore } from './store/portfolioStore';
import { useRuntimeStore } from './store/runtimeStore'; import { useRuntimeStore } from './store/runtimeStore';
import { useOpenClawStore } from './store/openclawStore';
import { useUIStore } from './store/uiStore'; import { useUIStore } from './store/uiStore';
const EDITABLE_AGENT_WORKSPACE_FILES = [ const EDITABLE_AGENT_WORKSPACE_FILES = [
@@ -139,11 +138,6 @@ export default function LiveTradingApp() {
addSystemMessage, addSystemMessage,
}); });
// Make clientRef available to OpenClaw panel via store
useEffect(() => {
useOpenClawStore.getState().setClientRef(clientRef);
}, [clientRef]);
const runtimeControls = useRuntimeControls({ const runtimeControls = useRuntimeControls({
clientRef, clientRef,
currentTickers: tickers, currentTickers: tickers,

View File

@@ -13,7 +13,6 @@ const AgentFeed = lazy(() => import('./AgentFeed'));
const StatisticsView = lazy(() => import('./StatisticsView')); const StatisticsView = lazy(() => import('./StatisticsView'));
const StockExplainView = lazy(() => import('./StockExplainView.jsx')); const StockExplainView = lazy(() => import('./StockExplainView.jsx'));
const TraderView = lazy(() => import('./TraderView.jsx')); const TraderView = lazy(() => import('./TraderView.jsx'));
const OpenClawView = lazy(() => import('./OpenClawView.jsx'));
function ViewLoadingFallback({ label = '加载中...' }) { function ViewLoadingFallback({ label = '加载中...' }) {
return ( return (
@@ -137,6 +136,12 @@ export default function AppShell({
const { setIsRuntimeSettingsOpen, setIsWatchlistPanelOpen } = useRuntimeStore(); const { setIsRuntimeSettingsOpen, setIsWatchlistPanelOpen } = useRuntimeStore();
const { setChartTab, setCurrentView, setIsResizing, setLeftWidth } = useUIStore(); const { setChartTab, setCurrentView, setIsResizing, setLeftWidth } = useUIStore();
useEffect(() => {
if (currentView === 'openclaw') {
setCurrentView('statistics');
}
}, [currentView, setCurrentView]);
// Resize handler // Resize handler
useEffect(() => { useEffect(() => {
if (!isResizing) return; if (!isResizing) return;
@@ -172,7 +177,7 @@ export default function AppShell({
currentView === 'room' ? 'show-room' : currentView === 'room' ? 'show-room' :
currentView === 'explain' ? 'show-explain' : currentView === 'explain' ? 'show-explain' :
currentView === 'chart' ? 'show-chart' : currentView === 'chart' ? 'show-chart' :
currentView === 'statistics' ? 'show-statistics' : 'show-openclaw'}`; 'show-statistics'}`;
return base; return base;
}, [currentView]); }, [currentView]);
@@ -382,12 +387,6 @@ export default function AppShell({
> >
统计 统计
</button> </button>
<button
className={`view-nav-btn ${currentView === 'openclaw' ? 'active' : ''}`}
onClick={() => setCurrentView('openclaw')}
>
OpenClaw
</button>
</div> </div>
<div className={viewClassName}> <div className={viewClassName}>
@@ -491,13 +490,6 @@ export default function AppShell({
/> />
</Suspense> </Suspense>
</div> </div>
{/* OpenClaw View Panel */}
<div className="view-panel">
<Suspense fallback={<ViewLoadingFallback label="加载 OpenClaw 视图..." />}>
<OpenClawView />
</Suspense>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,7 +9,7 @@ const resolveValue = (updater, currentValue) => (
*/ */
export const useUIStore = create((set) => ({ export const useUIStore = create((set) => ({
// Current view // 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) })), setCurrentView: (currentView) => set((state) => ({ currentView: resolveValue(currentView, state.currentView) })),
// Chart tab // Chart tab

View File

@@ -1098,10 +1098,6 @@ export default function GlobalStyles() {
transform: translateX(-80%); transform: translateX(-80%);
} }
.view-slider-five.show-openclaw {
transform: translateX(-100%);
}
.view-panel { .view-panel {
flex: 0 0 33.333%; flex: 0 0 33.333%;
width: 33.333%; width: 33.333%;