fix: 앱 오늘 날씨 포스트 시간 칸을 웹처럼 4칸씩 두 줄로

This commit is contained in:
minaChoi committed 2026-10-19 10:32:01 +09:00
1 parent d1143e4207
commit 1bc39655c9
2 files changed
+24 -13

No files matched your search

+1 -1
View File
@@ -171,7 +171,7 @@
| [ ] | Xcode 설치 후 iOS 시뮬레이터에서 전체 확인 | | `mobile/` |
| [x] | 안드로이드 개발 빌드(`expo run:android`) 설치 확인: 홈 화면 해 아이콘·'날씨각' 이름, 실데이터 화면 | | `mobile/` |
| [ ] | **[결정 필요]** 앱 ID(안드로이드 패키지·iOS 번들 ID) — 지금 `com.anonymous.nalssigak`. 후보 `kr.o2o.nalssigak` / `kr.o2o.weather`. 스토어에 올리면 못 바꿈 | 스토어 등록 때 정하기로 | `mobile/app.json` |
| [ ] | 히어로 낮·저녁·밤 기온이 '?' (10/19 오전, 9811 백엔드) — 오늘 예보 칸 temp_c 가 비어 오는지 백엔드 확인 | 안드로이드 확인 중 발견 | `/v1/weather/today` |
| [ ] | 오늘 날씨 칸(3시·6시 등)이 '?' — 백엔드가 며칠 꺼져 있다 켜지면 최신 발표(예: 8시, 9시부터 예보)만 받아 새벽 칸 행이 없음. 0시 재수신(`_midnight_missing`)은 0시에 묵은 값이 있으면 안 돎. 운영은 늘 켜져 있어 드묾 — 고칠 땐 오늘 칸 중 비거나 묵은 칸이 있으면 다시 받기 | 10/19 로컬(9811)에서 확인, 앱·웹 버그 아님 | `backend/services/weather_service.py` (`today`, `ensure_vilage`, `_midnight_missing`) |
| [x] | 앱 아이콘 3D 해 그림(600px 원본)으로: iOS 1024, 안드로이드 적응형(앞·뒤·단색), 스플래시. Expo Go 에선 안 보이고 개발 빌드부터 보임. 스토어용으로는 1024px 이상 원본이 있으면 더 선명 | | `mobile/assets/images/` |
| [x] | 3단계-1: 탭 5개 구조·위 막대·하늘 배경·밤 테마(Uniwind dark), Today 히어로·각 순위·행사/TOP5/계절 띠 | | `mobile/src/app/`, `mobile/src/components/` |
| [x] | Today 게시물 카드(슬라이드 7종·넘기기·좋아요·댓글·텍스트 공유), 3·6·9번째 글 뒤 띠 | | `mobile/src/components/post/`, `mobile/src/app/index.tsx` |
+23 -12
View File
@@ -23,6 +23,8 @@ const GAK_BG: SlideBg[] = ['butter', 'peach', 'lilac'];
const ROW_ICON_BG: Record<string, SlideBg> = { umbrella: 'lilac', vent: 'mint', sunset: 'peach', thermo: 'sky', maple: 'peach', moon: 'lilac', glasses: 'butter' };
const DARK = new Set<SlideBg>(['dusk', 'night']);
const chunk = <T,>(items: T[], n: number) => Array.from({ length: Math.ceil(items.length / n) }, (_, i) => items.slice(i * n, i * n + n));
// 노을 하늘 상황(1 가려짐 2 낮은 구름 3 물들 구름 적음 4 넓게 물듦 5 두꺼움)별 하늘, 시간 칸 색 (웹 .b-sit-*, .b-cut-*)
const SIT_BG: Record<number, { colors: Stops; locations: readonly [number, number, ...number[]] }> = {
1: { colors: ['#6f7690', '#9aa0b4', '#b9b4c0'], locations: [0, 0.55, 1] },
@@ -98,18 +100,27 @@ export function SlideView({ slide, bg }: { slide: Slide; bg: SlideBg }) {
<Base colors={palette.sky}>
<Eyebrow>{slide.eyebrow}</Eyebrow>
<Big>{slide.line}</Big>
<View className="mt-3.5 flex-1 flex-row gap-2">
{slide.hours.map((h) => {
const tone = HOUR_TONE[h.tone ?? ''];
return (
<View key={h.label} className={`flex-1 items-center justify-between overflow-hidden rounded-[18px] px-1 pt-2.5 pb-[9px] ${tone ? '' : 'border-b-[5px] border-shade bg-card'}`} style={tone ? { backgroundColor: tone.bg, borderBottomWidth: 5, borderColor: tone.edge } : undefined}>
{h.temp_c != null && <LinearGradient colors={['rgba(255,122,69,0.1)', 'rgba(255,122,69,0.34)']} style={{ position: 'absolute', left: 0, right: 0, bottom: 0, height: `${20 + ((h.temp_c - lo) / span) * 70}%` }} />}
<Text className={`text-xs font-bold ${tone ? 'text-[#5a6380]' : 'text-ink2'}`}>{h.label}</Text>
<Ic name={h.icon} size={34} />
<Text className={`font-bagel text-[21px] ${tone ? 'text-[#28304a]' : 'text-ink'}`}>{deg(h.temp_c)}</Text>
</View>
);
})}
{/* 웹 grid-cols-4: 4칸씩 줄을 나눈다 */}
<View className="mt-3.5 flex-1 gap-2">
{chunk(slide.hours, 4).map((row) => (
<View key={row[0].label} className="flex-1 flex-row gap-2">
{row.map((h) => {
const tone = HOUR_TONE[h.tone ?? ''];
return (
<View key={h.label} className={`flex-1 items-center justify-between overflow-hidden rounded-[18px] px-1 pt-2.5 pb-[9px] ${tone ? '' : 'border-b-[5px] border-shade bg-card'}`} style={tone ? { backgroundColor: tone.bg, borderBottomWidth: 5, borderColor: tone.edge } : undefined}>
{h.temp_c != null && <LinearGradient colors={['rgba(255,122,69,0.1)', 'rgba(255,122,69,0.34)']} style={{ position: 'absolute', left: 0, right: 0, bottom: 0, height: `${20 + ((h.temp_c - lo) / span) * 70}%` }} />}
<Text className={`text-xs font-bold ${tone ? 'text-[#5a6380]' : 'text-ink2'}`}>{h.label}</Text>
<Ic name={h.icon} size={34} />
<Text className={`font-bagel text-[21px] ${tone ? 'text-[#28304a]' : 'text-ink'}`}>{deg(h.temp_c)}</Text>
</View>
);
})}
{/* 마지막 줄이 모자라면 빈 칸으로 너비를 맞춘다 */}
{Array.from({ length: 4 - row.length }, (_, i) => (
<View key={`pad${i}`} className="flex-1" />
))}
</View>
))}
</View>
</Base>
);