From df057057ffd27da013f4438cdf3f90110c175f86 Mon Sep 17 00:00:00 2001 From: caadiq Date: Wed, 15 Apr 2026 22:07:23 +0900 Subject: [PATCH] =?UTF-8?q?UI=20=EC=A1=B0=EC=A0=95:=20=ED=95=B4=EB=B0=A9?= =?UTF-8?q?=20=EC=A3=BC=EA=B0=84=20=ED=97=A4=EB=8D=94=20=EB=B6=84=EA=B8=B0?= =?UTF-8?q?,=20=EC=BA=90=EB=A6=AD=ED=84=B0=20=EC=B9=B4=EB=93=9C=20?= =?UTF-8?q?=EB=B3=B4=EC=8A=A4=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 해방 주간 보스 설정 헤더: 단순 계산에선 합산만, 주차별에선 주간+월간/6500 분할 표시 - 보스 수익 계산기 캐릭터 카드의 보스 아이콘을 보스 목록 순서로 정렬 (12개 상한은 여전히 수익 기준으로 선발) Co-Authored-By: Claude Opus 4.6 (1M context) --- .../boss-crystal/user/CharacterPanel.jsx | 8 ++++++-- .../liberation/components/WeeklyDefault.jsx | 16 +++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/frontend/src/features/boss-crystal/user/CharacterPanel.jsx b/frontend/src/features/boss-crystal/user/CharacterPanel.jsx index 0aa4136..512295b 100644 --- a/frontend/src/features/boss-crystal/user/CharacterPanel.jsx +++ b/frontend/src/features/boss-crystal/user/CharacterPanel.jsx @@ -11,6 +11,7 @@ const MAX_PER_CHARACTER = 12 const MAX_PER_ACCOUNT = 90 function CharacterContent({ char, selections, bosses }) { + const bossIndex = new Map(bosses.map((b, i) => [b.id, i])) const selectedBosses = Object.entries(selections || {}) .filter(([, sel]) => sel) .map(([bossId, sel]) => { @@ -25,9 +26,12 @@ function CharacterContent({ char, selections, bosses }) { } }) .filter(Boolean) - .sort((a, b) => b.revenue - a.revenue) - const visibleBosses = selectedBosses.slice(0, MAX_PER_CHARACTER) + // 12개 상한은 수익 높은 순으로 취한 뒤, 표시는 보스 목록 순서대로 정렬 + const topByRevenue = [...selectedBosses].sort((a, b) => b.revenue - a.revenue).slice(0, MAX_PER_CHARACTER) + const visibleBosses = topByRevenue.sort( + (a, b) => (bossIndex.get(a.boss.id) ?? 0) - (bossIndex.get(b.boss.id) ?? 0) + ) const totalRevenue = visibleBosses.reduce((s, x) => s + x.revenue, 0) const count = selectedBosses.length diff --git a/frontend/src/features/liberation/components/WeeklyDefault.jsx b/frontend/src/features/liberation/components/WeeklyDefault.jsx index 2976f70..bc368ff 100644 --- a/frontend/src/features/liberation/components/WeeklyDefault.jsx +++ b/frontend/src/features/liberation/components/WeeklyDefault.jsx @@ -82,11 +82,17 @@ export default function WeeklyDefault({ weekly, onChange, totalWeekly, totalMont
주간 보스 설정
- {totalWeekly} - + - {totalMonthly} - / - 6500 + {mode === 'weekly' ? ( + <> + {totalWeekly} + + + {totalMonthly} + / + 6500 + + ) : ( + +{totalWeekly + totalMonthly} + )}