모의투자 메뉴 제거
This commit is contained in:
@@ -62,14 +62,6 @@ const IcChart = () => (
|
|||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
|
|
||||||
const IcPaper = () => (
|
|
||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
|
||||||
<rect x="2" y="3" width="12" height="10" rx="1.5"/>
|
|
||||||
<line x1="5" y1="6" x2="11" y2="6"/>
|
|
||||||
<line x1="5" y1="9" x2="9" y2="9"/>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
|
|
||||||
const IcBacktest = () => (
|
const IcBacktest = () => (
|
||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
|
||||||
<rect x="1" y="9" width="2.5" height="5" rx="0.5"/>
|
<rect x="1" y="9" width="2.5" height="5" rx="0.5"/>
|
||||||
@@ -148,8 +140,7 @@ const IcTrendSearch = () => (
|
|||||||
const MENU_ITEMS: { page: MenuPage; label: string; icon: React.ReactNode }[] = [
|
const MENU_ITEMS: { page: MenuPage; label: string; icon: React.ReactNode }[] = [
|
||||||
{ page: 'dashboard', label: '대시보드', icon: <IcDashboard /> },
|
{ page: 'dashboard', label: '대시보드', icon: <IcDashboard /> },
|
||||||
{ page: 'chart', label: '실시간차트', icon: <IcChart /> },
|
{ page: 'chart', label: '실시간차트', icon: <IcChart /> },
|
||||||
{ page: 'paper', label: '모의투자', icon: <IcPaper /> },
|
{ page: 'virtual', label: '가상매매', icon: <IcVirtual /> },
|
||||||
{ page: 'virtual', label: '가상투자', icon: <IcVirtual /> },
|
|
||||||
{ page: 'trend-search', label: '추세검색', icon: <IcTrendSearch /> },
|
{ page: 'trend-search', label: '추세검색', icon: <IcTrendSearch /> },
|
||||||
{ page: 'strategy-editor', label: '전략편집기', icon: <IcStrategyEditor /> },
|
{ page: 'strategy-editor', label: '전략편집기', icon: <IcStrategyEditor /> },
|
||||||
{ page: 'backtest', label: '백테스팅', icon: <IcBacktest /> },
|
{ page: 'backtest', label: '백테스팅', icon: <IcBacktest /> },
|
||||||
|
|||||||
@@ -340,11 +340,11 @@ const VirtualTradingPage: React.FC<Props> = ({
|
|||||||
return (
|
return (
|
||||||
<BuilderPageShell
|
<BuilderPageShell
|
||||||
theme={theme}
|
theme={theme}
|
||||||
title="가상투자"
|
title="가상매매"
|
||||||
subtitle="Virtual Trading"
|
subtitle="Virtual Trading"
|
||||||
pageClassName="bps-page--vtd"
|
pageClassName="bps-page--vtd"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
loadingText="가상투자 대시보드 로딩…"
|
loadingText="가상매매 대시보드 로딩…"
|
||||||
collapsiblePanels
|
collapsiblePanels
|
||||||
headerCenter={(
|
headerCenter={(
|
||||||
<VirtualSessionHeaderControls
|
<VirtualSessionHeaderControls
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export const VirtualSessionHeaderControls: React.FC<SessionProps> = ({
|
|||||||
aria-label="자동매매"
|
aria-label="자동매매"
|
||||||
title={
|
title={
|
||||||
!paperTradingEnabled
|
!paperTradingEnabled
|
||||||
? '설정 › 가상투자에서 가상투자를 활성화하세요'
|
? '설정 › 가상투자에서 가상매매를 활성화하세요'
|
||||||
: paperAutoTradeEnabled
|
: paperAutoTradeEnabled
|
||||||
? 'Match 충족 시 자동 매수·매도'
|
? 'Match 충족 시 자동 매수·매도'
|
||||||
: '수동 주문만 가능'
|
: '수동 주문만 가능'
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export type SettingsCategoryId =
|
|||||||
| 'paper' | 'alert' | 'network' | 'admin';
|
| 'paper' | 'alert' | 'network' | 'admin';
|
||||||
|
|
||||||
export const TOP_MENU_IDS: TopMenuId[] = [
|
export const TOP_MENU_IDS: TopMenuId[] = [
|
||||||
'dashboard', 'chart', 'paper', 'virtual', 'trend-search', 'strategy-editor', 'backtest', 'settings',
|
'dashboard', 'chart', 'virtual', 'trend-search', 'strategy-editor', 'backtest', 'settings',
|
||||||
];
|
];
|
||||||
|
|
||||||
export const SETTINGS_MENU_IDS: SettingsCategoryId[] = [
|
export const SETTINGS_MENU_IDS: SettingsCategoryId[] = [
|
||||||
@@ -30,7 +30,7 @@ export const MENU_LABELS: Record<string, string> = {
|
|||||||
dashboard: '대시보드',
|
dashboard: '대시보드',
|
||||||
chart: '실시간차트',
|
chart: '실시간차트',
|
||||||
paper: '모의투자',
|
paper: '모의투자',
|
||||||
virtual: '가상투자',
|
virtual: '가상매매',
|
||||||
'trend-search': '추세검색',
|
'trend-search': '추세검색',
|
||||||
strategy: '투자전략',
|
strategy: '투자전략',
|
||||||
'strategy-editor': '전략편집기',
|
'strategy-editor': '전략편집기',
|
||||||
@@ -67,6 +67,7 @@ export function canAccessMenu(
|
|||||||
permissions: Record<string, boolean> | null | undefined,
|
permissions: Record<string, boolean> | null | undefined,
|
||||||
menuId: string,
|
menuId: string,
|
||||||
): boolean {
|
): boolean {
|
||||||
|
if (menuId === 'paper') return false;
|
||||||
if (menuId === 'strategy') return false;
|
if (menuId === 'strategy') return false;
|
||||||
if (!permissions) return menuId === 'chart';
|
if (!permissions) return menuId === 'chart';
|
||||||
if (menuId === 'strategy-editor') {
|
if (menuId === 'strategy-editor') {
|
||||||
|
|||||||
Reference in New Issue
Block a user