From d3fda95d042635886b74877fbc4922b79ce3c205 Mon Sep 17 00:00:00 2001 From: caadiq Date: Tue, 14 Apr 2026 14:22:20 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=B4=EB=B0=A9=20=EA=B3=84=EC=82=B0?= =?UTF-8?q?=EA=B8=B0=20UI=20=EB=8B=A4=EB=93=AC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 섹션 폭 max-w-3xl로 통일 - ProgressBar 초상화 테두리 제거, 세그먼트/초상화 간격 gap-2 - 1차 해방 라벨 색상을 에메랄드와 구분되는 보라(#a78bfa)로 - 예상 해방 날짜 텍스트 크기 키우고 요일 표시 - DatePicker 선택 날짜에 요일 표시 - Select 드롭다운이 아래 공간 부족하면 위로 펼침 - Select 옵션 패딩 py-2.5로 키움 - 주간 보스 설정 보스 초상화(w-10)·이름(text-base)·행 높이(h-16) 키움 Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/DatePicker.jsx | 4 ++- frontend/src/components/Select.jsx | 24 ++++++++++---- .../src/features/liberation/Liberation.jsx | 8 ++--- .../liberation/components/ProgressBar.jsx | 33 ++++++++++--------- .../liberation/components/WeeklyDefault.jsx | 10 +++--- 5 files changed, 47 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/DatePicker.jsx b/frontend/src/components/DatePicker.jsx index 7afceb4..0223b2a 100644 --- a/frontend/src/components/DatePicker.jsx +++ b/frontend/src/components/DatePicker.jsx @@ -69,10 +69,12 @@ export default function DatePicker({ value, onChange, placeholder = '날짜 선 const selectYear = (y) => setViewDate(new Date(y, month, 1)) const selectMonth = (m) => { setViewDate(new Date(year, m, 1)); setViewMode('days') } + const DOW = ['일', '월', '화', '수', '목', '금', '토'] const formatDisplay = (s) => { if (!s) return '' const [y, m, d] = s.split('-') - return `${y}년 ${parseInt(m)}월 ${parseInt(d)}일` + const dow = DOW[new Date(`${s}T00:00:00+09:00`).getDay()] + return `${y}년 ${parseInt(m)}월 ${parseInt(d)}일 (${dow})` } const isSelected = (day) => { diff --git a/frontend/src/components/Select.jsx b/frontend/src/components/Select.jsx index b574000..13013e3 100644 --- a/frontend/src/components/Select.jsx +++ b/frontend/src/components/Select.jsx @@ -7,7 +7,9 @@ import { motion, AnimatePresence } from 'framer-motion' */ export default function Select({ value, onChange, options, disabled, className = '', placeholder = '선택', align = 'left' }) { const [open, setOpen] = useState(false) + const [flipUp, setFlipUp] = useState(false) const ref = useRef(null) + const buttonRef = useRef(null) useEffect(() => { if (!open) return @@ -18,11 +20,21 @@ export default function Select({ value, onChange, options, disabled, className = return () => document.removeEventListener('mousedown', handler) }, [open]) + useEffect(() => { + if (!open || !buttonRef.current) return + const rect = buttonRef.current.getBoundingClientRect() + const estHeight = Math.min(options.length * 44 + 8, 240) + const spaceBelow = window.innerHeight - rect.bottom + const spaceAbove = rect.top + setFlipUp(spaceBelow < estHeight && spaceAbove > spaceBelow) + }, [open, options.length]) + const selected = options.find((o) => o.value === value) return (