Compare commits
4 commits
281332ad14
...
2d52a1668f
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d52a1668f | |||
| 67cefb49a7 | |||
| 7191ec7af7 | |||
| 3ef40e8111 |
3 changed files with 10 additions and 6 deletions
|
|
@ -118,8 +118,8 @@ function SymbolCard({ symbol, equipped, charId }) {
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => patch({ dailyDone: !dailyDone })}
|
||||
title="오늘 일퀘 완료 여부"
|
||||
className="shrink-0 rounded-md h-8 px-3 text-xs font-semibold border disabled:opacity-40"
|
||||
title="금일 일일 퀘스트 완료 여부"
|
||||
className="shrink-0 rounded-md h-8 px-3 text-xs font-semibold border"
|
||||
style={dailyDone ? {
|
||||
background: 'var(--selected-bg)',
|
||||
borderColor: 'var(--selected-border)',
|
||||
|
|
@ -140,12 +140,12 @@ function SymbolCard({ symbol, equipped, charId }) {
|
|||
<div className="flex justify-between text-sm tabular-nums mb-1.5">
|
||||
{isMax ? (
|
||||
<span style={{ color: 'var(--text-muted)' }}>
|
||||
성장치 <span className="font-bold" style={{ color: 'var(--warning-text-bright)' }}>MAX</span>
|
||||
성장치 <span className="font-bold" style={{ color: 'var(--progress-red)' }}>MAX</span>
|
||||
</span>
|
||||
) : effectivelyMax ? (
|
||||
<Tooltip text={`Lv.${symbol.max_level}까지 상승 가능`}>
|
||||
<span style={{ color: 'var(--text-muted)' }}>
|
||||
성장치 {growth} <span className="font-bold" style={{ color: 'var(--warning-text-bright)' }}>(MAX)</span> / {requireGrowth}
|
||||
성장치 {growth} <span className="font-bold" style={{ color: 'var(--progress-amber)' }}>(MAX)</span> / {requireGrowth}
|
||||
</span>
|
||||
</Tooltip>
|
||||
) : reachableLevel > level ? (
|
||||
|
|
@ -170,7 +170,7 @@ function SymbolCard({ symbol, equipped, charId }) {
|
|||
className="h-full transition-all"
|
||||
style={{
|
||||
width: isMax || effectivelyMax ? '100%' : `${Math.min((growth / requireGrowth) * 100, 100)}%`,
|
||||
background: isMax || effectivelyMax ? 'var(--progress-amber)' : 'var(--progress-emerald)',
|
||||
background: isMax ? 'var(--progress-red)' : effectivelyMax ? 'var(--progress-amber)' : 'var(--progress-emerald)',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ export function formatKoreanDate(d) {
|
|||
* - 일퀘는 매일, 주간퀘는 매주 목요일 리셋 시 N회분을 한 번에 지급한다고 가정
|
||||
* - extra(추가 심볼)는 즉시 적용
|
||||
* - dailyDone이면 오늘 일퀘는 이미 받은 걸로 간주 (내일부터 다시 지급)
|
||||
* - 주간퀘는 day 0(오늘)이 목요일이어도 지급하지 않음: 주간퀘 획득 드롭다운의
|
||||
* 값이 이미 '이번 주에 받은 수량'을 반영한다고 가정. 다음 목요일부터 누적.
|
||||
*/
|
||||
export function computeCompletion({ remainingSymbols, daily, weeklyPerWeek, extra, dailyDone }) {
|
||||
const need = Math.max(remainingSymbols - extra, 0)
|
||||
|
|
@ -28,7 +30,7 @@ export function computeCompletion({ remainingSymbols, daily, weeklyPerWeek, extr
|
|||
let cursor = dayjs().tz(KST).startOf('day')
|
||||
for (let day = 0; day < 3650; day++) {
|
||||
if (!(day === 0 && dailyDone)) acc += daily
|
||||
if (cursor.day() === 4 && weeklyPerWeek > 0) acc += weeklyPerWeek
|
||||
if (day > 0 && cursor.day() === 4 && weeklyPerWeek > 0) acc += weeklyPerWeek
|
||||
if (acc >= need) return { days: day, date: cursor.toDate() }
|
||||
cursor = cursor.add(1, 'day')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@
|
|||
--progress-track: #0f172a;
|
||||
--progress-emerald: #10b981;
|
||||
--progress-amber: #f59e0b;
|
||||
--progress-red: #ef4444;
|
||||
|
||||
--accent-bright: #6ee7b7;
|
||||
--accent-muted: rgba(16, 185, 129, 0.1);
|
||||
|
|
@ -265,6 +266,7 @@
|
|||
--progress-track: #e5e7eb;
|
||||
--progress-emerald: #10b981;
|
||||
--progress-amber: #f59e0b;
|
||||
--progress-red: #ef4444;
|
||||
|
||||
--accent-bright: #047857;
|
||||
--accent-muted: rgba(16, 185, 129, 0.1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue