feat: 앱 오늘 피드를 웹과 맞춤 — 히어로 오늘/내일 전환·좋아요·댓글·보내기·점수 근거 창, 오늘의 각 카드(gak_post), 날씨각 카드(그림 슬라이드), 행사·TOP5 띠 없앰, 좋아요·댓글 로그인 없이 (GA hero_day_switch, like hero_post·gak_post)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
skkimandClaude committed 2026-11-04 17:23:44 +09:00
1 parent e8b8cc79b6
commit 01b5f917b9
16 files changed
+449 -156

No files matched your search

+6 -4
View File
@@ -1,4 +1,4 @@
import type { GakSlide, HoursSlide, PlanSlide, PostData, RowsSlide, SunsetSlide, WeekSlide } from '@nalssigak/shared/api/client/types.gen';
import type { GakSlide, HoursSlide, ImageSlide, PlanSlide, PostData, RowsSlide, SunsetSlide, WeekSlide } from '@nalssigak/shared/api/client/types.gen';
import { PostType, SlotTone } from '@nalssigak/shared/api/client/types.gen';
import { cardBg, clockShort } from '@nalssigak/shared/lib';
import type { SlideBg } from '@nalssigak/shared/lib/types';
@@ -14,10 +14,10 @@ import { MoonArt } from '@/components/moon';
import { Credit, Ic, Rows, Thumb } from '@/components/ui';
import { CARD_BG } from '@/lib/colors';
import { useSheet } from '@/lib/sheet';
import { imageUri } from '@/lib/site';
import { apiUri, imageUri } from '@/lib/site';
import { useSky } from '@/lib/sky';
export type Slide = HoursSlide | RowsSlide | GakSlide | SunsetSlide | WeekSlide | PlanSlide;
export type Slide = HoursSlide | RowsSlide | GakSlide | SunsetSlide | WeekSlide | PlanSlide | ImageSlide;
type Stops = readonly [string, string, ...string[]];
@@ -50,7 +50,7 @@ const HOUR_TONE: Record<string, { bg: string; edge: string }> = {
/** 배경색은 API에 없어 글 종류·아이콘으로 고른다 */
export function slideBg(post: PostData, slide: Slide): SlideBg {
if (slide.kind === 'hours') return 'sky';
if (slide.kind === 'hours' || slide.kind === 'image') return 'sky';
if (slide.kind === 'sunset') return 'dusk';
if (slide.kind === 'week') return 'mint';
if (slide.kind === 'plan') return slide.eyebrow.startsWith('일') ? 'peach' : 'butter';
@@ -254,6 +254,8 @@ export function SlideView({ slide, bg }: { slide: Slide; bg: SlideBg }) {
</Base>
);
}
// 카드뉴스: 관리자가 만든 4:5 그림 한 장 (/v1/card/... 는 API 서버 경로)
if (slide.kind === 'image') return <Image source={{ uri: apiUri(slide.url) }} accessibilityLabel={slide.alt ?? undefined} style={{ flex: 1 }} contentFit="cover" />;
if (slide.kind === 'rows' && slide.image)
return (
<View className="flex-1 justify-end">