From 9f9e02559810daaca070df3a5693da50408ddd53 Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 11 Jun 2026 13:10:33 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=A4=EB=A7=A4=ED=83=AD=20=EC=A3=BC?= =?UTF-8?q?=EB=AC=B8=ED=8C=A8=EB=84=90=EC=9D=84=20=EC=8A=A4=ED=94=8C?= =?UTF-8?q?=EB=A6=BF=20=EC=B9=B4=EB=93=9C=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=EC=9C=BC=EB=A1=9C=20=EB=B3=B5=EC=9B=90=20(=EC=83=81?= =?UTF-8?q?=EB=8B=A8=20=EB=A7=A4=EC=88=98,=20=ED=95=98=EB=8B=A8=20?= =?UTF-8?q?=EB=A7=A4=EB=8F=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - TradeTabOrderPanel(탭 방식) → TradeSplitOrderPanel(카드 분리 방식)으로 전환 - VirtualTradingPage·PaperTradingPage에 '거래' 외부 탭 복원 - 거래 내역(미체결/체결/원장)을 '거래' 탭 하위로 원복 Co-authored-by: Cursor --- frontend/src/components/PaperTradingPage.tsx | 64 +++++++++---------- frontend/src/components/RightSidePanel.tsx | 5 +- .../components/TradeNotificationListPage.tsx | 5 +- .../src/components/VirtualTradingPage.tsx | 32 +++++----- 4 files changed, 50 insertions(+), 56 deletions(-) diff --git a/frontend/src/components/PaperTradingPage.tsx b/frontend/src/components/PaperTradingPage.tsx index 1350f15..9202891 100644 --- a/frontend/src/components/PaperTradingPage.tsx +++ b/frontend/src/components/PaperTradingPage.tsx @@ -23,7 +23,7 @@ import PaperPendingOrdersList from './paper/PaperPendingOrdersList'; import PaperLedgerTab from './paper/PaperLedgerTab'; import PaperAssetTrendChart from './paper/PaperAssetTrendChart'; import { computePaperMetrics } from '../utils/paperMetrics'; -import { TradeTabOrderPanel, TradeOrderbookPanelContent, TradeRightPanelBody } from './trade'; +import { TradeSplitOrderPanel, TradeOrderbookPanelContent, TradeRightPanelBody } from './trade'; import type { Theme, TradeOrderFillRequest } from '../types'; import PaperAnalysisChart from './paper/PaperAnalysisChart'; import PaperLeftStrategyTab from './paper/PaperLeftStrategyTab'; @@ -38,7 +38,7 @@ import { formatVirtualTargetOptionLabel } from '../utils/virtualTargetNames'; type HistoryTab = 'open' | 'recent' | 'ledger'; type CenterTab = 'invest' | 'chart'; -type RightTab = 'trade' | 'orderbook'; +type RightTab = 'trade' | 'orderbook' | 'history'; type LeftTab = 'strategy' | 'settings'; interface Props { @@ -140,7 +140,7 @@ const PaperTradingPage: React.FC = ({ } finally { setInitialLoading(false); } - if (opts?.focusHistory) setRightTab('trade'); + if (opts?.focusHistory) setRightTab('history'); }, []); useEffect(() => { @@ -293,33 +293,7 @@ const PaperTradingPage: React.FC = ({
-
- ); - - const tradeHistorySlot = ( -
-
- - - -
-
- {historyTab === 'open' ? ( - void loadData()} /> - ) : historyTab === 'ledger' ? ( - - ) : ( - - )} -
+
); @@ -445,7 +419,7 @@ const PaperTradingPage: React.FC = ({ right={( {rightTab === 'trade' ? ( - = ({ paperTradingEnabled={paperTradingEnabled} paperAutoTradeEnabled={paperAutoTradeEnabled} onPaperOrderFilled={() => void loadData({ focusHistory: true })} - historySlot={tradeHistorySlot} /> - ) : ( + ) : rightTab === 'orderbook' ? ( = ({ tradeStrength={tradeStrength ?? undefined} onRowClick={handleOrderbookRowClick} /> + ) : ( +
+
+ + + +
+
+ {historyTab === 'open' ? ( + void loadData()} /> + ) : historyTab === 'ledger' ? ( + + ) : ( + + )} +
+
)}
)} diff --git a/frontend/src/components/RightSidePanel.tsx b/frontend/src/components/RightSidePanel.tsx index aa22a8a..f333ad1 100644 --- a/frontend/src/components/RightSidePanel.tsx +++ b/frontend/src/components/RightSidePanel.tsx @@ -5,7 +5,7 @@ */ import React, { useState, useEffect, useRef, useCallback } from 'react'; import { - TradeTabOrderPanel, + TradeSplitOrderPanel, TradeOrderbookPanelContent, TradeRightPanelTabs, TradeRightPanelBody, @@ -158,7 +158,7 @@ const RightSidePanel: React.FC = ({ {activeTab === 'trade' && ( - = ({ paperTradingEnabled={paperTradingEnabled} paperAutoTradeEnabled={paperAutoTradeEnabled} onPaperOrderFilled={onPaperOrderFilled} - hideHistory /> )} diff --git a/frontend/src/components/TradeNotificationListPage.tsx b/frontend/src/components/TradeNotificationListPage.tsx index 24e40b9..4e99d29 100644 --- a/frontend/src/components/TradeNotificationListPage.tsx +++ b/frontend/src/components/TradeNotificationListPage.tsx @@ -23,7 +23,7 @@ import BacktestAnalysisReportModal from './backtest/BacktestAnalysisReportModal' import type { BacktestAnalysisReportModel } from './backtest/BacktestAnalysisReportModal'; import { coerceFiniteNumber } from '../utils/safeFormat'; import { - TradeTabOrderPanel, + TradeSplitOrderPanel, TradeOrderbookPanelContent, TradeRightPanelTabs, TradeRightPanelBody, @@ -753,7 +753,7 @@ export const TradeNotificationListPage: React.FC = ({ bodyClassName="tnl-right-body" > {rightTab === 'trade' ? ( - = ({ paperTradingEnabled={paperTradingEnabled} paperAutoTradeEnabled={paperAutoTradeEnabled} onPaperOrderFilled={() => void refreshPaperData()} - hideHistory /> ) : ( = ({ setTrades(tr); } catch { /* ignore */ } onPaperOrderFilled?.(); - if (opts?.focusHistory) setRightTab('trade'); + if (opts?.focusHistory) setRightTab('history'); }, [onPaperOrderFilled]); const handleGlobalDisplayModeChange = useCallback((mode: VirtualCardDisplayMode) => { @@ -472,20 +472,10 @@ const VirtualTradingPage: React.FC = ({
+
); - const tradeHistorySlot = ( - - ); - return ( = ({ right={( {rightTab === 'trade' ? ( - = ({ paperTradingEnabled={paperTradingEnabled} paperAutoTradeEnabled={paperAutoTradeEnabled} onPaperOrderFilled={() => void refreshPaperData({ focusHistory: true })} - historySlot={tradeHistorySlot} /> - ) : ( + ) : rightTab === 'orderbook' ? ( = ({ tradeStrength={tradeStrength ?? undefined} onRowClick={handleOrderbookRowClick} /> + ) : ( + )} )}