Remove OpenClaw page from frontend
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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({
|
||||
>
|
||||
统计
|
||||
</button>
|
||||
<button
|
||||
className={`view-nav-btn ${currentView === 'openclaw' ? 'active' : ''}`}
|
||||
onClick={() => setCurrentView('openclaw')}
|
||||
>
|
||||
OpenClaw
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className={viewClassName}>
|
||||
@@ -491,13 +490,6 @@ export default function AppShell({
|
||||
/>
|
||||
</Suspense>
|
||||
</div>
|
||||
|
||||
{/* OpenClaw View Panel */}
|
||||
<div className="view-panel">
|
||||
<Suspense fallback={<ViewLoadingFallback label="加载 OpenClaw 视图..." />}>
|
||||
<OpenClawView />
|
||||
</Suspense>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user