저장팝업 텍스트 색상 수정

This commit is contained in:
Macbook
2026-05-26 23:50:13 +09:00
parent 94e96b9a9b
commit fe812389cc
13 changed files with 728 additions and 62 deletions
@@ -7,6 +7,7 @@ import {
type StrategyFlowNodeData,
} from '../../utils/strategyFlowLayout';
import { hasNodeSettings } from '../../utils/conditionPeriods';
import { getStrategyIndicatorDisplayName } from '../../utils/strategyPaletteStorage';
import ConditionNodeSettings from './ConditionNodeSettings';
const LOGIC_COLORS: Record<string, string> = {
@@ -220,6 +221,7 @@ export const ConditionFlowNode = memo(function ConditionFlowNode({ id, data, sel
const node = d.logicNode!;
const cond = node.condition;
const ind = cond?.indicatorType ?? 'COND';
const indLabel = getStrategyIndicatorDisplayName(ind);
const condType = cond?.conditionType ?? '';
const isCross = ['CROSS_UP', 'CROSS_DOWN'].includes(condType);
const tone = isCross ? 'cross' : 'value';
@@ -245,7 +247,7 @@ export const ConditionFlowNode = memo(function ConditionFlowNode({ id, data, sel
canTargetConnect={d.canTargetConnect !== false}
/>
<div className="se-flow-cond-top">
<div className="se-flow-cond-badge">{ind}</div>
<div className="se-flow-cond-badge">{indLabel}</div>
<div className="se-flow-cond-actions">
{showSettings && (
<button
@@ -267,7 +269,7 @@ export const ConditionFlowNode = memo(function ConditionFlowNode({ id, data, sel
<button type="button" className="se-flow-del" title="삭제" onClick={() => d.onDelete?.(id)}>×</button>
</div>
</div>
<div className="se-flow-cond-text">{d.label ?? ind}</div>
<div className="se-flow-cond-text">{d.label ?? indLabel}</div>
{settingsOpen && cond && d.def && (
<ConditionNodeSettings
condition={cond}
@@ -1,6 +1,7 @@
import React from 'react';
import type { LogicNode } from '../../utils/strategyTypes';
import { nodeToText, type DefType } from '../../utils/strategyEditorShared';
import { getStrategyIndicatorDisplayName } from '../../utils/strategyPaletteStorage';
import { getIndicatorPaletteCategory } from './paletteCategories';
import {
collectEditorBranches,
@@ -21,16 +22,18 @@ interface Props {
function renderCondition(node: LogicNode, def: DefType): React.ReactNode {
const full = nodeToText(node, def);
const ind = node.condition?.indicatorType ?? '';
const tail = ind && full.startsWith(`${ind} -`) ? full.slice(ind.length) : full;
const indLabel = getStrategyIndicatorDisplayName(ind);
const prefix = `${indLabel} -`;
const tail = indLabel && full.startsWith(prefix) ? full.slice(prefix.length) : full;
const cat = getIndicatorPaletteCategory(ind);
return (
<>
<span className="se-formula-punc">(</span>
{ind ? (
{indLabel ? (
<>
<span className={`se-formula-ind se-formula-ind--${cat}`}>{ind}</span>
{tail ? <span className="se-formula-detail">{tail}</span> : null}
<span className={`se-formula-ind se-formula-ind--${cat}`}>{indLabel}</span>
{tail ? <span className="se-formula-detail">{tail.startsWith(' ') ? tail : ` ${tail}`}</span> : null}
</>
) : (
<span className="se-formula-detail">{full || '?'}</span>
@@ -10,6 +10,7 @@ import {
type DefType,
} from '../../utils/strategyEditorShared';
import { hasNodeSettings } from '../../utils/conditionPeriods';
import { getStrategyIndicatorDisplayName } from '../../utils/strategyPaletteStorage';
import ConditionNodeSettings from './ConditionNodeSettings';
import {
type EditorConditionState,
@@ -109,7 +110,9 @@ const TreeNodeComp: React.FC<TreeNodeProps> = ({
>
<div className="sp-node-head sp-node-head--cond" style={{ borderLeftColor: color }}>
<span className="sp-node-badge" style={{ background: color }}>
{node.type === 'CONDITION' && node.condition ? node.condition.indicatorType : node.type}
{node.type === 'CONDITION' && node.condition
? getStrategyIndicatorDisplayName(node.condition.indicatorType)
: node.type}
</span>
<span className="sp-node-label">{label}</span>
<div className="sp-node-actions">