From 48b7adfda206dfbbd5f86cd05ca4a67eb2f3ae74 Mon Sep 17 00:00:00 2001 From: Macbook Date: Wed, 24 Jun 2026 00:40:16 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EB=9E=B5=EC=A7=80=ED=91=9C=20?= =?UTF-8?q?=EC=BB=A8=ED=8A=B8=EB=A1=A4=EB=AA=85=20=ED=95=9C=EA=B8=80?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/StrategyEditorPage.tsx | 11 ++--------- .../StrategyEvaluationIndicatorPalettePanel.tsx | 11 ++--------- frontend/src/utils/strategyPaletteStorage.ts | 9 +++++++++ 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/StrategyEditorPage.tsx b/frontend/src/components/StrategyEditorPage.tsx index 6012475..d61731b 100644 --- a/frontend/src/components/StrategyEditorPage.tsx +++ b/frontend/src/components/StrategyEditorPage.tsx @@ -49,6 +49,7 @@ import TemplatePaletteTab, { type TemplatePaletteRow } from './strategyEditor/Te import SidewaysFilterPaletteTab from './strategyEditor/SidewaysFilterPaletteTab'; import { buildSidewaysFilterNode, loadSidewaysPaletteItems } from '../utils/sidewaysFilterPaletteStorage'; import { + BAND_PALETTE_CHIP_ITEMS, loadPaletteItems, type PaletteItem, } from '../utils/strategyPaletteStorage'; @@ -1706,14 +1707,6 @@ export default function StrategyEditorPage({ { type: 'operator' as const, value: 'NOT', label: 'NOT', color: 'logic-not' }, ]; - const maBandItems = [ - { type: 'indicator' as const, value: 'MA', label: 'MA', desc: '이동평균', color: 'band' }, - { type: 'indicator' as const, value: 'EMA', label: 'EMA', desc: '지수이동평균', color: 'band' }, - { type: 'indicator' as const, value: 'BOLLINGER', label: 'Bollinger', desc: '볼린저밴드', color: 'band' }, - { type: 'indicator' as const, value: 'DONCHIAN', label: 'Donchian', desc: '돈치안 채널', color: 'band' }, - { type: 'indicator' as const, value: 'ICHIMOKU', label: 'Ichimoku', desc: '일목균형표', color: 'band' }, - ]; - const q = paletteSearch.trim().toLowerCase(); const match = (label: string, desc?: string) => !q || label.toLowerCase().includes(q) || (desc?.toLowerCase().includes(q) ?? false); @@ -2278,7 +2271,7 @@ export default function StrategyEditorPage({

밴드 · 추세

- {maBandItems.filter(i => match(i.label, i.desc)).map(item => ( + {BAND_PALETTE_CHIP_ITEMS.filter(i => match(i.label, i.desc)).map(item => ( = ({ editor }) => }; const filteredMaBand = useMemo( - () => MA_BAND_ITEMS.filter(i => match(i.label, i.desc)), + () => BAND_PALETTE_CHIP_ITEMS.filter(i => match(i.label, i.desc)), // eslint-disable-next-line react-hooks/exhaustive-deps [q], ); diff --git a/frontend/src/utils/strategyPaletteStorage.ts b/frontend/src/utils/strategyPaletteStorage.ts index 941e48f..0547c12 100644 --- a/frontend/src/utils/strategyPaletteStorage.ts +++ b/frontend/src/utils/strategyPaletteStorage.ts @@ -26,6 +26,15 @@ import { export type PaletteItemKind = 'auxiliary' | 'composite'; +/** 밴드·추세 팔레트 칩 (전략편집기·전략평가 지표 탭) */ +export const BAND_PALETTE_CHIP_ITEMS = [ + { type: 'indicator' as const, value: 'MA', label: '이동평균선', desc: '단순 이동평균', color: 'band' }, + { type: 'indicator' as const, value: 'EMA', label: 'EMA', desc: '지수이동평균', color: 'band' }, + { type: 'indicator' as const, value: 'BOLLINGER', label: '볼린저밴드', desc: 'Bollinger', color: 'band' }, + { type: 'indicator' as const, value: 'DONCHIAN', label: '돈치안', desc: '돈치안 채널', color: 'band' }, + { type: 'indicator' as const, value: 'ICHIMOKU', label: '일목균형표', desc: 'Ichimoku', color: 'band' }, +] as const; + export interface PaletteItem { id: string; kind: PaletteItemKind;