diff --git a/frontend/src/b/Sheets.tsx b/frontend/src/b/Sheets.tsx index 29cb333..b5fb453 100644 --- a/frontend/src/b/Sheets.tsx +++ b/frontend/src/b/Sheets.tsx @@ -33,7 +33,7 @@ import { useSky } from './skyContext' import { SHARE_SIZES, shareImage, type ShareSize } from './storyImage' import { SheetContext, useSheet, type SharePayload, type SheetState } from './sheetContext' import { HeartIcon } from './svg' -import { MyTalks } from './talk' +import { MyTalks, TalkSheet } from './talk' import { Avatar, Ic, Skel, StateBox, TAP44, Thumb } from './ui' export function SheetProvider({ children }: { children: ReactNode }) { @@ -76,7 +76,7 @@ export function SheetProvider({ children }: { children: ReactNode }) { ) } -const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요' } as const +const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요', talk: '이야기' } as const /** 아래에서 올라오는 창: 네이티브 라 ESC·포커스 가두기·포커스 되돌리기가 기본으로 된다 */ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void }) { @@ -141,6 +141,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void {state.type === 'mix' && } {state.type === 'install' && } {state.type === 'weatherWhy' && } + {state.type === 'talk' && } )} {!state && } diff --git a/frontend/src/b/TodayPage.tsx b/frontend/src/b/TodayPage.tsx index 41408cd..3dc3f16 100644 --- a/frontend/src/b/TodayPage.tsx +++ b/frontend/src/b/TodayPage.tsx @@ -156,6 +156,8 @@ const WEATHER_ICON: Record = { sleet: 'snow', } // 구름 수: 구름 많음 둘, 흐림·비·눈 셋 +// 히어로 오른쪽 위 좋아요·댓글·보내기: 셋 다 같은 32px 칸에 아이콘 가운데, 수는 아이콘 옆 +const HERO_ACT = 'relative flex h-8 min-w-8 cursor-pointer items-center justify-center gap-1 text-[13px] font-extrabold' const CLOUDS = [ { cls: 'top-9 left-[5%] h-8 w-[84px]', d: '.1s', f: '6s' }, { cls: 'top-[96px] left-[63%] h-9 w-[96px]', d: '.25s', f: '6.4s' }, @@ -332,7 +334,7 @@ function Hero({ hero, post, today, ranked, all, feedLoad, todayLoad }: HeroProps {t.mo}월 {t.d}일 {WEEKDAYS[t.wd]}요일 - + {post && ( <> )} - diff --git a/frontend/src/b/sheetContext.ts b/frontend/src/b/sheetContext.ts index a89e7e3..5911af7 100644 --- a/frontend/src/b/sheetContext.ts +++ b/frontend/src/b/sheetContext.ts @@ -1,4 +1,5 @@ import type { MyGak } from './myGakState' +import type { TalkData } from '../api/client/types.gen' import type { WeatherWhyPayload } from './weatherWhy' import { createContext, use } from 'react' /** square: 1:1 비율일 때 slides 대신 찍을 틀 (없으면 slides) */ @@ -18,6 +19,7 @@ export type SheetState = | { type: 'mix'; shared?: MyGak } | { type: 'install' } | { type: 'weatherWhy'; why: WeatherWhyPayload } + | { type: 'talk'; talk: TalkData } | null export type SheetApi = { open: (s: Exclude) => void; close: () => void } diff --git a/frontend/src/b/talk.tsx b/frontend/src/b/talk.tsx index 4ba26cf..e4be301 100644 --- a/frontend/src/b/talk.tsx +++ b/frontend/src/b/talk.tsx @@ -230,17 +230,27 @@ function TalkRow({ t, onGone, compact }: { t: TalkData; onGone?: () => void; com const src = t.image?.startsWith('/v1/') ? API_BASE_URL + t.image : (t.image ?? undefined) return ( -
- -
- +
+ + + + {/* 묶음 카드는 옆 카드 높이에 맞춰 늘어나니, 시간·좋아요 줄을 맨 아래에 붙여 빈 곳이 아래에 몰리지 않게 */} +
+ {t.nickname} {[t.region_name, slotWord(t.created_at), t.weather, t.topic && t.topic !== TalkTopic.LOCAL ? topicName(t.topic) : null].filter(Boolean).join(' · ')} - {t.image && compact && } -

{t.body}

+ {/* 묶음 안 작은 카드는 글이 잘리니, 누르면 창에서 글 전체·큰 사진을 본다 */} + {compact ? ( + + ) : ( +

{t.body}

+ )} {t.image && !compact && } - + {ago(t.created_at)} · 좋아요 {count}개 ·{' '}
)}
-
@@ -295,6 +305,15 @@ export function FeedComposer({ onPosted }: { onPosted: (t: TalkData) => void }) ) } +/** 묶음에서 누른 글 하나를 창으로: 글 전체·큰 사진·좋아요·더보기 */ +export function TalkSheet({ talk }: { talk: TalkData }) { + return ( +
+ +
+ ) +} + /** 피드에 끼우는 글 한 장 */ export function TalkCard({ t, onGone }: { t: TalkData; onGone?: () => void }) { return ( @@ -316,7 +335,7 @@ export function TalkGroup({ title, topic, talks }: { title: string; topic?: numb
{talks.map((t) => ( -
+
))}