From 15ec6da083e9e0349176baed1ce84d91379026b3 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Fri, 23 Oct 2026 15:36:18 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=9D=B4=EC=95=BC=EA=B8=B0=20=EB=AC=B6?= =?UTF-8?q?=EC=9D=8C=20=EC=B9=B4=EB=93=9C=EB=A5=BC=20=EB=88=84=EB=A5=B4?= =?UTF-8?q?=EB=A9=B4=20=EC=B0=BD=EC=97=90=EC=84=9C=20=EA=B8=80=20=EC=A0=84?= =?UTF-8?q?=EC=B2=B4=C2=B7=ED=81=B0=20=EC=82=AC=EC=A7=84=C2=B7=EC=A2=8B?= =?UTF-8?q?=EC=95=84=EC=9A=94=C2=B7=EB=8D=94=EB=B3=B4=EA=B8=B0,=20?= =?UTF-8?q?=EB=AC=B6=EC=9D=8C=20=EC=B9=B4=EB=93=9C=20=EB=86=92=EC=9D=B4?= =?UTF-8?q?=EB=A5=BC=20=EB=A7=9E=EC=B6=94=EA=B3=A0=20=EC=8B=9C=EA=B0=84=20?= =?UTF-8?q?=EC=A4=84=EC=9D=84=20=EC=95=84=EB=9E=98=EC=97=90,=20=ED=9E=88?= =?UTF-8?q?=EC=96=B4=EB=A1=9C=20=EC=A2=8B=EC=95=84=EC=9A=94=C2=B7=EB=8C=93?= =?UTF-8?q?=EA=B8=80=C2=B7=EB=B3=B4=EB=82=B4=EA=B8=B0=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EC=BD=98=EC=9D=84=20=EA=B0=99=EC=9D=80=20=EC=B9=B8=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/Sheets.tsx | 5 +++-- frontend/src/b/TodayPage.tsx | 10 +++++---- frontend/src/b/sheetContext.ts | 2 ++ frontend/src/b/talk.tsx | 37 +++++++++++++++++++++++++--------- 4 files changed, 39 insertions(+), 15 deletions(-) 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) => ( -
+
))}