Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 22 additions & 36 deletions assets/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions assets/images/income-graphic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@
- 홈 배너에서 설치 안내 바텀시트 표시. 배경 탭·뒤로 가기·나중에로 닫기
- 알림 허용하기는 준비 중 안내만 표시. 실제 알림 권한 요청·Web Push 구독·설치 여부 판정은 미연결이며 허용 완료로 표시하지 않음
- 시안의 iOS 조건은 설치 안내 문구이며 현재 배포가 푸시를 지원한다는 의미가 아님

## 실제 브라우저 여백 조정

- 웹에 그려둔 44px 상태바 여백을 홈·약관·프로필·수입·기록·과외 작성·설정에서 제거. SafeArea 처리는 유지
- 홈 헤더 56px, 설치 배너 76px, 탭 위 12px·아래 최소 8px로 조정
- 100dvh 지원 브라우저는 주소창을 제외한 실제 가시 높이에 루트를 맞춤. 브라우저 자체 UI 높이는 앱에서 조절하지 않음
- 남는 내용을 숨기지 않고 기존 ScrollView에서 끝까지 스크롤하도록 유지
4 changes: 4 additions & 0 deletions docs/income-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ API는 미확정입니다. `IncomeState`/`IncomeData`는 화면 모델이며 실
- `/dev/income?state=error`: 조회 실패 및 재시도

개발용 진입점은 프로필이 없으면 메모리에 미리보기 프로필을 설정해 기존 탭으로 이동합니다. production에서는 이 진입을 허용하지 않습니다. 실제 수입 탭은 `/income`이며 다른 탭의 이동 구조·공통 탭 아이콘 구현은 유지합니다.

## 공통 수입 그래픽

전달받은 graphic.svg 원본을 income-graphic.svg로 보관하고 공통 IncomeGraphic 컴포넌트로 표시합니다. 기본 100×100, 수입 요약 카드는 88×88로 적용합니다. 배치용 style과 size를 받을 수 있으며 장식 이미지이므로 접근성 읽기에서는 제외합니다. 원본의 민트색 카드·투명 효과는 보존합니다.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 22 additions & 36 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/components/IncomeGraphic.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Image } from 'expo-image';
import type { ImageProps } from 'expo-image';
import graphic from '../../assets/images/income-graphic.svg';

type Props = {
size?: number;
style?: ImageProps['style'];
};

/** 수입 관련 카드에서 재사용하는 장식 그래픽. 텍스트 정보는 부모 화면에서 제공합니다. */
export function IncomeGraphic({ size = 100, style }: Props) {
return (
<Image
source={graphic}
style={[{ width: size, height: size }, style]}
contentFit="contain"
accessible={false}
/>
);
}
1 change: 0 additions & 1 deletion src/features/home/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function HomeScreen({
const todoCount = data.tasks.reduce((sum, task) => sum + task.count, 0);
return (
<SafeAreaView edges={['top']} style={s.safe}>
<View style={s.webInset} />
<View style={s.header}>
<Image source={logo} style={s.logo} contentFit="contain" accessibilityLabel="SUDAM" />
<Pressable
Expand Down
7 changes: 2 additions & 5 deletions src/features/home/InstallSheet.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react';
import { Modal, Platform, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { Modal, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { ActionButton } from '@/components/ActionButton';
import { primitive } from '@/styles/colors';
Expand All @@ -17,10 +17,7 @@ export function InstallSheet({ onClose }: { onClose: () => void }) {
/>
<View
accessibilityViewIsModal
style={[
s.sheet,
{ paddingBottom: Math.max(insets.bottom, Platform.OS === 'web' ? 52 : 24) },
]}
style={[s.sheet, { paddingBottom: Math.max(insets.bottom, 24) }]}
>
<View style={s.handle} />
<ScrollView contentContainerStyle={s.content} bounces={false}>
Expand Down
15 changes: 7 additions & 8 deletions src/features/home/styles.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Platform, StyleSheet } from 'react-native';
import { StyleSheet } from 'react-native';
import { primitive } from '@/styles/colors';
const { blue, gray, orange } = primitive;
export const s = StyleSheet.create({
safe: { flex: 1, backgroundColor: '#fff' },
webInset: { height: Platform.OS === 'web' ? 44 : 0 },
header: {
height: 64,
height: 56,
paddingHorizontal: 24,
flexDirection: 'row',
alignItems: 'center',
Expand All @@ -21,17 +20,17 @@ export const s = StyleSheet.create({
},
profileText: { fontSize: 12, fontWeight: '600', color: blue[500] },
content: { paddingBottom: 24 },
banner: { height: 92, backgroundColor: blue[100] },
banner: { height: 76, backgroundColor: blue[100] },
bannerBody: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
paddingHorizontal: 24,
paddingRight: 32,
},
art: { width: 64, height: 64 },
art: { width: 56, height: 56 },
bannerCopy: { flex: 1, marginLeft: 12 },
bannerTitle: { fontSize: 15, fontWeight: '700', color: blue[500], marginBottom: 4 },
bannerTitle: { fontSize: 14, fontWeight: '700', color: blue[500], marginBottom: 4 },
bannerText: { fontSize: 12, lineHeight: 17, color: blue[600] },
close: {
position: 'absolute',
Expand All @@ -43,7 +42,7 @@ export const s = StyleSheet.create({
justifyContent: 'center',
},
closeText: { fontSize: 16, color: gray[200] },
section: { paddingHorizontal: 24, paddingTop: 20 },
section: { paddingHorizontal: 24, paddingTop: 16 },
sectionHeader: {
flexDirection: 'row',
alignItems: 'center',
Expand Down Expand Up @@ -98,7 +97,7 @@ export const s = StyleSheet.create({
emptyTasks: { borderWidth: 1, borderColor: gray[100] },
loadingRoot: { flex: 1 },
skeleton: { backgroundColor: gray[100], borderRadius: 8 },
bannerSkeleton: { height: 92, backgroundColor: gray[100] },
bannerSkeleton: { height: 76, backgroundColor: gray[100] },
lessonSkeleton: { height: 168 },
tasksSkeleton: { height: 171 },
skeletonDot: { marginHorizontal: 2 },
Expand Down
4 changes: 2 additions & 2 deletions src/features/income/IncomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { s } from './styles';
import { paymentStatus, won } from './types';
import type { IncomeInvoice, IncomeState } from './types';
import gradient from '../../../assets/images/income-gradient.svg';
import card from '../../../assets/images/income-card.svg';
import { IncomeGraphic } from '@/components/IncomeGraphic';

function InvoiceCard({ invoice }: { invoice: IncomeInvoice }) {
const status = paymentStatus(invoice);
Expand Down Expand Up @@ -79,7 +79,7 @@ export function IncomeScreen({ state, onRetry }: { state: IncomeState; onRetry?:
<Text style={s.summaryLabel}>이번달 교육비</Text>
<Text style={s.amount}>{won(state.data.summary.expectedAmount)}</Text>
</View>
<Image source={card} style={s.illustration} contentFit="contain" />
<IncomeGraphic size={88} style={s.illustration} />
<View style={s.totals}>
<Text style={s.totalText}>입금 {won(state.data.summary.receivedAmount)}</Text>
<View style={s.separator} />
Expand Down
6 changes: 3 additions & 3 deletions src/features/income/styles.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { StyleSheet, Platform } from 'react-native';
import { StyleSheet } from 'react-native';
import { primitive, semantic as c } from '@/styles/colors';
import { typography as t } from '@/styles/typography';
import { padding, radius, gap, grid } from '@/styles/measurement';
export const s = StyleSheet.create({
safe: { flex: 1, alignItems: 'center', backgroundColor: c.surface.input },
phone: { flex: 1, width: '100%', maxWidth: 390, paddingTop: Platform.OS === 'web' ? 44 : 0 },
phone: { flex: 1, width: '100%', maxWidth: 390 },
header: { height: 67, justifyContent: 'center', paddingHorizontal: grid.margin },
title: { ...t.heading[1].semiBold, color: c.text.default.strong },
scroll: { flex: 1 },
Expand Down Expand Up @@ -34,7 +34,7 @@ export const s = StyleSheet.create({
},
totalText: { ...t.body[5].semiBold, color: c.text.default.inverse },
separator: { width: 1, height: 12, backgroundColor: c.border.default },
illustration: { position: 'absolute', right: padding[16], top: 32, width: 64, height: 80 },
illustration: { position: 'absolute', right: padding[12], top: 24 },
info: {
marginTop: gap[20],
minHeight: 48,
Expand Down
4 changes: 2 additions & 2 deletions src/features/main/MainTabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function MainTabBar({
insets,
}: BottomTabBarProps) {
return (
<View role="tablist" style={[s.bar, { paddingBottom: padding[16] + insets.bottom }]}>
<View role="tablist" style={[s.bar, { paddingBottom: Math.max(padding[8], insets.bottom) }]}>
{state.routes.map((route, index) => {
const focused = index === state.index;
const icon = icons[route.name];
Expand Down Expand Up @@ -79,7 +79,7 @@ const s = StyleSheet.create({
bar: {
flexDirection: 'row',
justifyContent: 'space-between',
paddingTop: padding[16],
paddingTop: padding[12],
paddingHorizontal: padding[24],
backgroundColor: primitive.white[0],
},
Expand Down
7 changes: 2 additions & 5 deletions src/features/notifications/PushBannerProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
import type { ReactNode } from 'react';
import { AppState, Platform, StyleSheet, View } from 'react-native';
import { AppState, StyleSheet, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { PushBanner } from '@/components/PushBanner';
export type BannerNotification = {
Expand Down Expand Up @@ -57,10 +57,7 @@ export function PushBannerProvider({ children }: { children: ReactNode }) {
<Context.Provider value={{ show, dismiss }}>
{children}
{active && appState === 'active' && (
<View
pointerEvents="box-none"
style={[s.layer, { top: insets.top + (Platform.OS === 'web' ? 44 : 0) + 12 }]}
>
<View pointerEvents="box-none" style={[s.layer, { top: insets.top + 12 }]}>
<View pointerEvents="box-none" style={s.width}>
<PushBanner
title={active.title}
Expand Down
1 change: 0 additions & 1 deletion src/features/onboarding/OnboardingApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const s = StyleSheet.create({
maxWidth: 390,
backgroundColor: '#fff',
flex: 1,
paddingTop: Platform.OS === 'web' ? 44 : 0,
},
smallLink: { color: '#9a9fac', fontSize: 12 },
header: { height: 54, alignItems: 'center', justifyContent: 'center' },
Expand Down
4 changes: 2 additions & 2 deletions src/features/profile/ProfileScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default function ProfileScreen({ onSave, initialProfile }: Props) {
}
const s = StyleSheet.create({
safeArea: { flex: 1, alignItems: 'center', backgroundColor: semantic.surface.input },
phone: { flex: 1, width: '100%', maxWidth: 390, paddingTop: Platform.OS === 'web' ? 44 : 0 },
phone: { flex: 1, width: '100%', maxWidth: 390 },
header: { height: 54, alignItems: 'center', justifyContent: 'center' },
headerTitle: { ...typography.body[1].semiBold, color: semantic.text.default.strong },
back: {
Expand Down Expand Up @@ -233,7 +233,7 @@ const s = StyleSheet.create({
marginLeft: padding[4],
},
chips: { flexDirection: 'row', flexWrap: 'wrap', gap: gap[8] },
footer: { paddingHorizontal: grid.margin, paddingTop: padding[16], paddingBottom: 56 },
footer: { paddingHorizontal: grid.margin, paddingTop: padding[16], paddingBottom: 24 },
error: { marginBottom: gap[8] },
errorText: { ...typography.caption[1].regular, color: semantic.text.feedback.warning },
});
6 changes: 3 additions & 3 deletions src/features/session-record/styles.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { StyleSheet, Platform } from 'react-native';
import { StyleSheet } from 'react-native';
import { semantic as c } from '@/styles/colors';
import { padding, grid, radius, gap } from '@/styles/measurement';
import { typography as t } from '@/styles/typography';
export const s = StyleSheet.create({
safe: { flex: 1, alignItems: 'center', backgroundColor: c.surface.input },
phone: { flex: 1, width: '100%', maxWidth: 390, paddingTop: Platform.OS === 'web' ? 44 : 0 },
phone: { flex: 1, width: '100%', maxWidth: 390 },
header: { height: 72, alignItems: 'center', justifyContent: 'center' },
headerTitle: { ...t.body[1].semiBold, color: c.text.default.strong },
back: {
Expand Down Expand Up @@ -110,7 +110,7 @@ export const s = StyleSheet.create({
footer: {
paddingHorizontal: grid.margin,
paddingTop: padding[8],
paddingBottom: Platform.OS === 'web' ? 56 : 24,
paddingBottom: 24,
backgroundColor: c.surface.input,
gap: gap[12],
},
Expand Down
4 changes: 2 additions & 2 deletions src/features/terms/TermsScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from 'react';
import { Modal, Platform, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { Modal, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useRouter } from 'expo-router';
import { ActionButton } from '@/components/ActionButton';
Expand Down Expand Up @@ -185,7 +185,7 @@ export default function TermsScreen({ onSave, documents, initialChecked = false

const s = StyleSheet.create({
safeArea: { flex: 1, backgroundColor: semantic.surface.input, alignItems: 'center' },
phone: { flex: 1, width: '100%', maxWidth: 390, paddingTop: Platform.OS === 'web' ? 44 : 0 },
phone: { flex: 1, width: '100%', maxWidth: 390 },
header: { height: 72, alignItems: 'center', justifyContent: 'center' },
headerTitle: { ...typography.body[1].semiBold, color: semantic.text.default.strong },
back: {
Expand Down
4 changes: 2 additions & 2 deletions src/features/tutoring/TutoringFormLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import arrowBackImage from '../../../assets/images/arrow_back.svg';
import { useEffect, useState } from 'react';
import type { ReactNode } from 'react';
import { Platform, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { Image } from 'expo-image';
import { router } from 'expo-router';
import { SafeAreaView } from 'react-native-safe-area-context';
Expand Down Expand Up @@ -165,7 +165,7 @@ export function TutoringFormLayout({
const s = StyleSheet.create({
safe: { flex: 1, alignItems: 'center', backgroundColor: semantic.surface.input },
// 웹에서는 휴대폰 너비(390)로 가운데 정렬하고, 상태바 높이만큼 위를 띄웁니다.
phone: { flex: 1, width: '100%', maxWidth: 390, paddingTop: Platform.OS === 'web' ? 44 : 0 },
phone: { flex: 1, width: '100%', maxWidth: 390 },
navBar: {
flexDirection: 'row',
alignItems: 'center',
Expand Down
6 changes: 6 additions & 0 deletions src/styles/viewport.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* 주소창이 있는 모바일 브라우저에서도 하단 탭이 실제 보이는 높이 안에 배치됩니다. */
@supports (height: 100dvh) {
#root {
height: 100dvh;
}
}
1 change: 1 addition & 0 deletions src/styles/webInputStyles.web.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import './mobile-input.css';
import './viewport.css';
Loading