From b91212b9e1f540b4a6fe2aa6b2dcc06ef8aae234 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Mon, 12 Oct 2026 16:49:53 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=97=A4=EB=8D=94=20=EB=A1=9C=EA=B3=A0?= =?UTF-8?q?=20=EC=98=86=20=EA=B3=84=EC=A0=88=20=EC=B9=A9(=EA=B3=84?= =?UTF-8?q?=EC=A0=88=C2=B7=EC=A7=80=EA=B8=88=20=EC=A0=88=EA=B8=B0,=20?= =?UTF-8?q?=EB=88=84=EB=A5=B4=EB=A9=B4=20=EC=9D=B4=EB=B2=88=20=EC=A3=BC=20?= =?UTF-8?q?=EC=A0=88=EA=B8=B0),=20=EC=B2=98=EC=9D=8C=20=EB=93=A4=EC=96=B4?= =?UTF-8?q?=EC=98=AC=20=EB=95=8C=20'=EB=82=A0=EC=94=A8=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EB=8A=94=20=EC=A4=91=E2=80=A6'=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 2 ++ frontend/src/b/BLayout.tsx | 58 ++++++++++++++++++++++++++++++++++++-- frontend/src/b/b.css | 16 +++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index ae4e7a5..d173629 100644 --- a/TODO.md +++ b/TODO.md @@ -96,6 +96,8 @@ | [ ] | **[결정 필요]** 스켈레톤 작업에서 바뀐 디자인 — 댓글 없음 안내가 글자 두 줄 → 상자(스켈레톤 3줄 크기) | 스켈레톤 작업 중 발견 | `frontend/src/b/Sheets.tsx` (`CommentsSheet`) | | [x] | **[결정 필요]** 히어로 시안 A/B/C 중 선택 — 지금은 이전 히어로로 롤백 → 10/12 D4-2로 결정(해 안 점수 + 문장 두 줄은 서버 값 그대로 + 상태 한 줄 + 하루 흐름 칸, 높이는 지금 그대로 약 400px) | 히어로 다듬기 | `frontend/src/b/TodayPage.tsx`, `frontend/src/b/b.css` | | [x] | **[결정 필요]** 히어로 D4-2 상태 한 줄 — ① 습도는 서버가 %만 줘서 단계 기준을 새로 정해야 함 ② 불쾌지수 '불쾌'처럼 판정 이름을 그대로 쓸지 ③ 미세먼지·자외선은 늘 보일지, 조심할 때만 보일지 → 10/12 결정: 습도 건조(30% 미만)·보통(60% 이하)·습함, 불쾌지수 단계 이름 그대로, 늘 4개(밤엔 자외선 빼기) | 히어로 D4-2 시안 | `backend/services/hero_stats.py`, `backend/services/feed_service.py`, `frontend/src/b/TodayPage.tsx` | +| [ ] | **[결정 필요]** 각 목록 '지금 아님' 문구 — 계절이 아니라 각 시간대(등산 7~12시·피크닉 11~16시)가 지났다는 뜻인데 '가을' 표시 옆에 있어 비활성처럼 읽힘. 그 각의 시간('오전에 좋아요' 등)으로 바꿀지 | 사용자 지적 | `frontend/src/b/GakPage.tsx`, `frontend/src/b/TodayPage.tsx` | +| [ ] | **[결정 필요]** 계절별 각 늘리기 — 지금 '가을' 표시는 `is_core` 4개(피크닉·등산·캠핑·별보기)에 글자로 박혀 있고 계절 전환이 없음. 계절마다 각 후보 목록을 만들어 검토받고, 계절 필드로 바꾸기 | 사용자 요청 | `backend/seed/index_definition.json`, `frontend/src/b/GakPage.tsx` | | [x] | 댓글 좋아요 실패 시 알림 없음 (연결·서버 오류면 줄에 안내, 지워진 댓글이면 목록 새로고침) (화면은 되돌아감) | 댓글 대기 표시 작업 중 발견 | `frontend/src/b/Sheets.tsx` (`CommentRow`) | | [x] | **[결정 필요]** 노을 탭 재정리에서 정한 것 — ① 노을 등급 '흐림' → '잿빛'(피드 노을 포스트 문구도 같이 바뀜) ② 히어로에 '가장 붉을 때' 시각 하나는 결론('몇 시에')으로 남기고 나머지 시각은 시간표 한 곳에만 ③ '나가 볼 만해요/애매해요/쉬어요' 기준 60·40점, 내일·모레는 10점 넘게 높을 때만 '더 나아요' ④ '쉬어요'면 명소 추천 안 함 ⑤ 블루아워 시각은 시민박명 끝(-6°), 골든아워는 해 고도 6° → 10/7 노을 탭 다시 기획으로 대체: 점수 대신 하늘 상황 5가지, 결론은 상황 기준 | 노을 탭 재정리 | `backend/services/calc/sky_score.py`, `backend/services/sky_service.py`, `frontend/src/b/SkyPage.tsx` | | [x] | 노을 히어로 맨 윗줄("오늘 노을 · 구")이 보라 배경 위 흰 13px라 대비 약 3.9:1 (AA 4.5 미달) — 결론·근거·시각·점수는 어두운 상자 안으로 옮김, → 어두운 바탕을 깔아 6.7:1 | 노을 탭 재정리 중 발견 | `frontend/src/b/SkyPage.tsx` | diff --git a/frontend/src/b/BLayout.tsx b/frontend/src/b/BLayout.tsx index 9cc6650..3c5427c 100644 --- a/frontend/src/b/BLayout.tsx +++ b/frontend/src/b/BLayout.tsx @@ -1,5 +1,7 @@ import { useCallback, useEffect, useMemo, useState, type ReactNode } from 'react' import { NavLink, Outlet, useLocation } from 'react-router' +import { useIsFetching, useQuery } from '@tanstack/react-query' +import { getSeasonWeekOptions } from '../api/client/@tanstack/react-query.gen' import { cx } from '../lib/utils' import { kindOfHour, kst, type TimeKind } from './lib' import './b.css' @@ -11,7 +13,7 @@ import { useSheet } from './sheetContext' import { SheetProvider } from './Sheets' import { SkyContext, useSky } from './skyContext' import { PinIcon, TabIcon } from './svg' -import { Avatar, Skel } from './ui' +import { Avatar, Ic, Skel } from './ui' const TABS = [ { to: '/sky', key: 'sky', label: '노을', title: '노을' }, @@ -22,6 +24,26 @@ const TABS = [ { to: '/season', key: 'season', label: '계절·상식', title: '계절·상식' }, ] as const +// 달(1~12) → 계절 이름과 아이콘 +const SEASONS: [string, string][] = [['겨울', 'snow'], ['봄', 'garden'], ['여름', 'sun'], ['가을', 'maple']] +const seasonOf = (month: number) => SEASONS[Math.floor((month % 12) / 3)] + +/** 로고 옆 계절 칩: 계절 이름과 지금 절기. 누르면 이번 주 절기 창. 좁은 화면에선 절기를 뺀다 */ +function SeasonChip() { + const { open } = useSheet() + const week = useQuery(getSeasonWeekOptions()) + const [month] = useState(() => kst(new Date()).mo) + const [name, icon] = seasonOf(month) + const term = week.data?.term_now?.name + return ( + + ) +} + function TopBar() { const { pathname } = useLocation() const { region, locateStatus } = useRegion() @@ -31,7 +53,8 @@ function TopBar() { return (
- {tab?.title ?

{tab.title}

:

날씨각

} + {tab?.title ?

{tab.title}

:

날씨각

} +