전략지표 컨트롤명 한글변경

This commit is contained in:
Macbook
2026-06-24 00:40:16 +09:00
parent 821bbe0e84
commit 48b7adfda2
3 changed files with 13 additions and 18 deletions
@@ -49,6 +49,7 @@ import TemplatePaletteTab, { type TemplatePaletteRow } from './strategyEditor/Te
import SidewaysFilterPaletteTab from './strategyEditor/SidewaysFilterPaletteTab'; import SidewaysFilterPaletteTab from './strategyEditor/SidewaysFilterPaletteTab';
import { buildSidewaysFilterNode, loadSidewaysPaletteItems } from '../utils/sidewaysFilterPaletteStorage'; import { buildSidewaysFilterNode, loadSidewaysPaletteItems } from '../utils/sidewaysFilterPaletteStorage';
import { import {
BAND_PALETTE_CHIP_ITEMS,
loadPaletteItems, loadPaletteItems,
type PaletteItem, type PaletteItem,
} from '../utils/strategyPaletteStorage'; } from '../utils/strategyPaletteStorage';
@@ -1706,14 +1707,6 @@ export default function StrategyEditorPage({
{ type: 'operator' as const, value: 'NOT', label: 'NOT', color: 'logic-not' }, { 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 q = paletteSearch.trim().toLowerCase();
const match = (label: string, desc?: string) => const match = (label: string, desc?: string) =>
!q || label.toLowerCase().includes(q) || (desc?.toLowerCase().includes(q) ?? false); !q || label.toLowerCase().includes(q) || (desc?.toLowerCase().includes(q) ?? false);
@@ -2278,7 +2271,7 @@ export default function StrategyEditorPage({
<div className="se-palette-section se-palette-section--band"> <div className="se-palette-section se-palette-section--band">
<h3> · </h3> <h3> · </h3>
<div className="se-palette-grid se-palette-grid--3"> <div className="se-palette-grid se-palette-grid--3">
{maBandItems.filter(i => match(i.label, i.desc)).map(item => ( {BAND_PALETTE_CHIP_ITEMS.filter(i => match(i.label, i.desc)).map(item => (
<PaletteChip <PaletteChip
key={item.value} key={item.value}
{...item} {...item}
@@ -7,6 +7,7 @@ import IndicatorPaletteTab from '../strategyEditor/IndicatorPaletteTab';
import SidewaysFilterPaletteTab from '../strategyEditor/SidewaysFilterPaletteTab'; import SidewaysFilterPaletteTab from '../strategyEditor/SidewaysFilterPaletteTab';
import { getIndicatorPeriodLabel } from '../../utils/strategyFlowLayout'; import { getIndicatorPeriodLabel } from '../../utils/strategyFlowLayout';
import { import {
BAND_PALETTE_CHIP_ITEMS,
loadPaletteItems, loadPaletteItems,
type PaletteItem, type PaletteItem,
} from '../../utils/strategyPaletteStorage'; } from '../../utils/strategyPaletteStorage';
@@ -29,14 +30,6 @@ const OPERATORS = [
{ type: 'operator' as const, value: 'NOT', label: 'NOT', color: 'logic-not' }, { type: 'operator' as const, value: 'NOT', label: 'NOT', color: 'logic-not' },
]; ];
const MA_BAND_ITEMS = [
{ 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' },
];
function paletteKey(type: string, id: string) { function paletteKey(type: string, id: string) {
return `${type}:${id}`; return `${type}:${id}`;
} }
@@ -63,7 +56,7 @@ const StrategyEvaluationIndicatorPalettePanel: React.FC<Props> = ({ editor }) =>
}; };
const filteredMaBand = useMemo( 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 // eslint-disable-next-line react-hooks/exhaustive-deps
[q], [q],
); );
@@ -26,6 +26,15 @@ import {
export type PaletteItemKind = 'auxiliary' | 'composite'; 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 { export interface PaletteItem {
id: string; id: string;
kind: PaletteItemKind; kind: PaletteItemKind;