모의투자, 백테스팅 레이아웃 수정

This commit is contained in:
Macbook
2026-05-24 20:13:21 +09:00
parent 958b813f3b
commit af230a4233
23 changed files with 2394 additions and 782 deletions
+32 -4
View File
@@ -90,6 +90,7 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
const [signalTab, setSignalTab] = useState<'buy' | 'sell'>('buy');
const [rightTab, setRightTab] = useState<'indicators' | 'templates'>('indicators');
const [paletteSearch, setPaletteSearch] = useState('');
const [selectedPaletteKey, setSelectedPaletteKey] = useState<string | null>(null);
const [stratName, setStratName] = useState('');
const [stratDesc, setStratDesc] = useState('');
const [isSaving, setIsSaving] = useState(false);
@@ -575,6 +576,13 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
const match = (label: string, desc?: string) =>
!q || label.toLowerCase().includes(q) || (desc?.toLowerCase().includes(q) ?? false);
const paletteKey = (type: 'operator' | 'indicator', value: string) => `${type}:${value}`;
const selectPalette = (type: 'operator' | 'indicator', value: string) => {
setSelectedPaletteKey(paletteKey(type, value));
};
const isPaletteSelected = (type: 'operator' | 'indicator', value: string) =>
selectedPaletteKey === paletteKey(type, value);
return (
<div className={`se-page se-page--${theme}`}>
{saveToast && (
@@ -683,7 +691,7 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
setDeleteOpen(true);
}}
>
<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden>
<svg viewBox="0 0 16 16" width="17" height="17" aria-hidden>
<path
fill="currentColor"
d="M5.5 2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v.5H12a.5.5 0 0 1 0 1h-.55l-.62 8.07A1.5 1.5 0 0 1 9.83 13H6.17a1.5 1.5 0 0 1-1.49-1.43L4.05 3.5H4a.5.5 0 0 1 0-1h1.5V2zm1.5 0v.5h2V2H7zm-2.38 1.5l.58 7.53a.5.5 0 0 0 .5.47h3.66a.5.5 0 0 0 .5-.47l.58-7.53H4.62z"
@@ -710,8 +718,11 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
onPointerDown={onLeftSplitter}
/>
<main className="se-center">
<div className="se-center-work">
<div className="se-main">
<div className="se-main-row">
<main className="se-center">
<div className="se-center-panel">
<div className="se-center-work">
<div className="se-center-head">
<div className="se-signal-tabs">
<button
@@ -801,13 +812,16 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
def={DEF}
/>
</footer>
</div>
</main>
<aside className="se-right">
<div className="se-palette-panel">
<div className="se-right-tabs">
<button type="button" className={rightTab === 'indicators' ? 'se-right-tab se-right-tab--on' : 'se-right-tab'} onClick={() => setRightTab('indicators')}></button>
<button type="button" className={rightTab === 'templates' ? 'se-right-tab se-right-tab--on' : 'se-right-tab'} onClick={() => setRightTab('templates')}>릿</button>
</div>
<div className="se-right-body">
{rightTab === 'indicators' && (
<>
<input
@@ -820,7 +834,13 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
<h3> </h3>
<div className="se-palette-grid se-palette-grid--3">
{operators.map(op => (
<PaletteChip key={op.value} {...op} onAdd={() => applyPalette(op.type, op.value, op.label)} />
<PaletteChip
key={op.value}
{...op}
selected={isPaletteSelected(op.type, op.value)}
onSelect={() => selectPalette(op.type, op.value)}
onAdd={() => applyPalette(op.type, op.value, op.label)}
/>
))}
</div>
</div>
@@ -832,6 +852,8 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
key={item.value}
{...item}
period={getIndicatorPeriodLabel(item.value, DEF)}
selected={isPaletteSelected(item.type, item.value)}
onSelect={() => selectPalette(item.type, item.value)}
onAdd={() => applyPalette(item.type, item.value, item.label)}
/>
))}
@@ -849,6 +871,8 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
desc={item.desc}
color={item.color}
period={getIndicatorPeriodLabel(item.value, DEF)}
selected={isPaletteSelected('indicator', item.value)}
onSelect={() => selectPalette('indicator', item.value)}
onAdd={() => applyPalette('indicator', item.value, item.label)}
/>
))}
@@ -869,7 +893,11 @@ export default function StrategyEditorPage({ theme, activeIndicators = [] }: Pro
))}
</div>
)}
</div>
</div>
</aside>
</div>
</div>
</div>
{saveOpen && (