feat: 앱 이름 '날씨각'·해 아이콘·스플래시, 위치 찾기 10초 제한, 첫 로딩 덮개가 안 걷히던 것 수정

This commit is contained in:
minaChoi committed 2026-10-14 16:39:37 +09:00
1 parent b5d9adf396
commit 4fc9214de5
27 files changed
+30 -61

No files matched your search

+4 -1
View File
@@ -166,7 +166,10 @@
| [x] | 1단계: 웹·앱 공통 코드 `shared/`(`@nalssigak/shared`) 분리, 루트 npm workspaces, 웹 Docker 빌드 대상을 루트로 | 앱과 API 클라이언트·로직 공유 | `package.json`, `shared/`, `frontend/Dockerfile`, `compose.yaml`, `.dockerignore` |
| [x] | 2단계: 앱에 react-query·Uniwind 설정 + Metro가 `react`를 `mobile/node_modules`(19.2.3) 것만 쓰게 설정 — 루트에는 웹용 react 19.3.0이 있고 RN 렌더러는 19.2.3에서만 돌아감 | 앱 시작 준비 | `mobile/metro.config.js`, `mobile/src/app/_layout.tsx`, `mobile/src/lib/query-client.ts` |
| [x] | 앱 토큰 저장소 `expo-secure-store`로 `configureApi` 연결, API 주소는 `EXPO_PUBLIC_API_BASE_URL` | 웹은 localStorage | `mobile/src/lib/api.ts`, `mobile/.env.example` |
| [ ] | Xcode 설치 후 시뮬레이터에서 전체 확인 (시트·로그인·좋아요·위치 권한·이미지 공유) — 지금은 Expo 웹 화면과 iOS 번들 빌드까지만 확인 | | `mobile/` |
| [x] | 안드로이드 에뮬레이터(Expo Go)에서 확인: 오늘 화면 실데이터, 위치 권한 창, 탭 이동, 각 근거 시트 | | `mobile/` |
| [ ] | 안드로이드에서 로그인·좋아요·이미지 공유 눌러 보기 (에뮬레이터가 느려 일부만 확인) | | `mobile/` |
| [ ] | Xcode 설치 후 iOS 시뮬레이터에서 전체 확인 | | `mobile/` |
| [ ] | 앱 아이콘은 지금 평면 로고(`~/Desktop/nalssigak-logo-600.png`)를 SVG로 다시 그린 것 — 3D 해 원본 파일을 받으면 교체. Expo Go 에선 아이콘이 안 보이고 개발 빌드·스토어 빌드부터 보임 | 원본 파일이 PC에 없음 | `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` |
| [x] | 시트 7종(각 근거·읽을거리·댓글·이번 주 특집·로그인/가입·내 정보·지역 고르기)을 RN `Modal`로, 위 막대 로그인/아바타 | 새 패키지 없이 | `mobile/src/components/sheets/`, `mobile/src/components/top-bar.tsx` |
+7 -7
View File
@@ -1,18 +1,18 @@
{
"expo": {
"name": "mobile",
"slug": "mobile",
"name": "날씨각",
"slug": "nalssigak",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "mobile",
"scheme": "nalssigak",
"userInterfaceStyle": "automatic",
"ios": {
"icon": "./assets/expo.icon"
"icon": "./assets/images/icon.png"
},
"android": {
"adaptiveIcon": {
"backgroundColor": "#E6F4FE",
"backgroundColor": "#d6ebff",
"foregroundImage": "./assets/images/android-icon-foreground.png",
"backgroundImage": "./assets/images/android-icon-background.png",
"monochromeImage": "./assets/images/android-icon-monochrome.png"
@@ -28,9 +28,9 @@
[
"expo-splash-screen",
{
"backgroundColor": "#208AEF",
"backgroundColor": "#d6ebff",
"image": "./assets/images/splash-icon.png",
"imageWidth": 76
"imageWidth": 200
}
],
"expo-secure-store",
@@ -1,3 +0,0 @@
<svg width="652" height="606" viewBox="0 0 652 606" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M353.554 0H298.446C273.006 0 249.684 14.6347 237.962 37.9539L4.37994 502.646C-1.04325 513.435 -1.45067 526.178 3.2716 537.313L22.6123 582.918C34.6475 611.297 72.5404 614.156 88.4414 587.885L309.863 222.063C313.34 216.317 319.439 212.826 326 212.826C332.561 212.826 338.659 216.317 342.137 222.063L563.559 587.885C579.46 614.156 617.352 611.297 629.388 582.918L648.728 537.313C653.451 526.178 653.043 513.435 647.62 502.646L414.038 37.9539C402.316 14.6347 378.994 0 353.554 0Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

-40
View File
@@ -1,40 +0,0 @@
{
"fill" : {
"automatic-gradient" : "extended-srgb:0.00000,0.47843,1.00000,1.00000"
},
"groups" : [
{
"layers" : [
{
"image-name" : "expo-symbol 2.svg",
"name" : "expo-symbol 2",
"position" : {
"scale" : 1,
"translation-in-points" : [
1.1008400065293245e-05,
-16.046875
]
}
},
{
"image-name" : "grid.png",
"name" : "grid"
}
],
"shadow" : {
"kind" : "neutral",
"opacity" : 0.5
},
"translucency" : {
"enabled" : true,
"value" : 0.5
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

+13 -9
View File
@@ -1,5 +1,5 @@
import type { TimeKind } from '@nalssigak/shared/lib';
import { useIsFetching } from '@tanstack/react-query';
import { useQueryClient } from '@tanstack/react-query';
import { useEffect, useState } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Animated, { cancelAnimation, Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withRepeat, withSequence, withTiming } from 'react-native-reanimated';
@@ -38,19 +38,23 @@ function Hop({ name }: { name: string }) {
/** 처음 들어올 때만: 첫 데이터를 다 받을 때까지 하늘 위에 캐릭터와 '날씨 불러오는 중…'. 한 번 사라지면 다시 안 뜬다 */
export function FirstLoad() {
const fetching = useIsFetching();
const queryClient = useQueryClient();
const { kind } = useSky();
const [started, setStarted] = useState(false);
const [done, setDone] = useState(false);
const [gone, setGone] = useState(false);
// 받기 시작했다가 받는 게 없어지면 끝 (렌더 중에 바로 맞춘다)
if (fetching > 0 && !started) setStarted(true);
if (fetching === 0 && started && !done) setDone(true);
// 느린 망에서도 10초 넘게 막지 않는다 (그 뒤는 화면 안 스켈레톤이 맡는다)
// 받기 시작했다가 받는 게 없어지면 끝. 느린 망에서도 10초 넘게 막지 않는다 (그 뒤는 화면 안 스켈레톤이 맡는다)
useEffect(() => {
let seen = false;
const unsubscribe = queryClient.getQueryCache().subscribe(() => {
if (queryClient.isFetching() > 0) seen = true;
else if (seen) setDone(true);
});
const id = setTimeout(() => setDone(true), 10000);
return () => clearTimeout(id);
}, []);
return () => {
unsubscribe();
clearTimeout(id);
};
}, [queryClient]);
const shown = useSharedValue(1);
useEffect(() => {
if (!done) return;
+6 -1
View File
@@ -29,11 +29,16 @@ function readStored(): RegionData | null {
}
}
/** 위치를 못 잡으면(실내·에뮬레이터) 끝없이 기다리지 않게 웹처럼 10초에 끊는다 */
function withTimeout<T>(p: Promise<T>, ms: number): Promise<T> {
return Promise.race([p, new Promise<never>((_, reject) => setTimeout(() => reject(new Error('위치 찾기 시간 초과')), ms))]);
}
/** 위치 권한을 받아 가장 가까운 구. 권한이 없으면 'denied' */
async function findNearest(): Promise<RegionData | 'denied'> {
const { status } = await Location.requestForegroundPermissionsAsync();
if (status !== 'granted') return 'denied';
const pos = (await Location.getLastKnownPositionAsync({ maxAge: 600000 })) ?? (await Location.getCurrentPositionAsync({ accuracy: Location.Accuracy.Balanced }));
const pos = (await Location.getLastKnownPositionAsync({ maxAge: 600000 })) ?? (await withTimeout(Location.getCurrentPositionAsync({ accuracy: Location.Accuracy.Balanced }), 10000));
const { data } = await nearestRegion({ query: { lat: pos.coords.latitude, lon: pos.coords.longitude } });
if (!data.region) throw new Error('가까운 구를 찾지 못함');
return data.region;