Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ea9f8f04b | ||
|
|
2b1fa58f56 |
No files matched your search
@@ -238,7 +238,7 @@
|
||||
| [ ] | **[결정 필요]** 포스트 시도 단위가 17이 아니라 16 — `region.code` 앞 2자리에서 광주·전남이 둘 다 `12`(전남광주통합특별시)라 같은 댓글창을 씀. 그대로 둘지, 이름 앞머리로 광주·전남을 나눌지 | 포스트 시도 나누기 (10/8) | `backend/services/feed_service.py` (`sido_of`), `backend/seed/region.csv` |
|
||||
| [ ] | 광주·전남 구는 행사가 안 잡힐 수 있음 — 구 코드 시도는 `12`인데 행사 수집·`event.sido_code`는 `29`(광주)·`46`(전남). 좌표 없는 행사는 `is_nearby`·`nearby_sidos`에서 빠짐 | 포스트 시도 나누기 중 발견 (10/8) | `backend/services/week_service.py:125,144`, `backend/services/external/culture_api.py:28` |
|
||||
| [ ] | **[결정 필요]** 앱인토스 입점 여부 — 검토안은 "웹 출시 후 보기 전용 토스판으로 시험, 첫 달 포인트·알림 20~30만 원, 5주차에 포인트 없는 주의 7일 재방문율 20%를 기준으로 계속/중단" (https://claude.ai/artifact/QgA7iq3CCesTRYcFyZck71) | 앱인토스 검토 | |
|
||||
| [ ] | **[결정 필요]** 토스판 광고 — 앱인토스 수익은 토스 광고·인앱결제뿐인데 웹은 '광고 없음'으로 정함. 안 붙이면 토스판은 비용만 드는 홍보 채널 | 앱인토스 검토 | |
|
||||
| [ ] | 토스판 광고 — 결정함(11/23): 토스판에만 보상 없는 '광고 보고 응원하기' 카드(`tossAd.tsx`), 웹·앱은 계속 '광고 없음'. 광고 그룹 `보상형 광고 1차(각)`가 2026-12-02 에 삭제 예정이라 그 전에 `build:toss` 번들을 콘솔에 올려 노출시켜야 함(검수 3~5영업일). 운영 번들은 `frontend/.env.toss` 에 `VITE_TOSS_REWARD_AD_ID`(라이브 ID)를 넣고 만들 것 — 없으면 테스트 ID 로 동작 | 앱인토스 메일(11/23) | `frontend/src/b/tossAd.tsx` |
|
||||
| [ ] | 앱인토스 사전 확인 — 시간대별 밤 배경이 '라이트 모드' 규칙에 걸리는지, 네이버 지도 링크가 '단순 정보 확인' 예외인지 채널톡 문의 | 앱인토스 검토 | `frontend/src/b/BLayout.tsx`, `frontend/src/b/ui.tsx` |
|
||||
| [ ] | **[결정 필요]** 각 34개 정리 — 계절 밖 각(10월 물놀이·냉면) 노출 막기(각별 '보여 줄 달'), 나쁜 일 예고 각(택시대란·배달폭주·김서림·화장붕괴)을 순위에서 빼고 '조심' 카드로, 날씨 관계 약한 재미 각(공부·넷플릭스·짬뽕·막걸리·뜨아·군밤·집콕) 축소 또는 '재미' 표시 (https://claude.ai/artifact/4WgpUjdNqdSNnMN4ASB4BB) | 토스판 전략 검토 | `backend/seed/index_definition.json`, `backend/services/index_service.py` |
|
||||
| [ ] | 글 재고 부족 — 25편(한 문장 8·시 3·상식 4·계절 9)이라 매일 보면 1~2주 안에 반복, 계절 글은 10월분뿐. 기획의 'AI 주 1회 생성'이 스케줄러에 없음. 8주치 재고 또는 생성·검토 파이프라인 | 토스판 전략 검토 | `backend/seed/article.json`, `backend/scheduler/jobs.py` |
|
||||
|
||||
@@ -64,6 +64,10 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화
|
||||
| `해돋이날짜_전환` (코드 `sunrise_day`) | 해돋이 지도 페이지에서 날짜 칩을 바꿈 (12월에만 칩이 둘) | `day: 'newyear' \| 'next'`(새해 첫날·오늘/내일) | `SunrisePage.tsx` |
|
||||
| `내각_저장` (코드 `my_gak_save`) | 내 각 만들기 성공 (로그인 전엔 기기에 저장) | `gak_name` | `myGakState.ts` `create` |
|
||||
| `토스소개_시작` (코드 `toss_intro_start`) | 토스판 첫 소개 화면에서 '시작하기' | 없음 | `tossIntro.tsx` |
|
||||
| `토스광고_누름` (코드 `toss_ad_click`) | 토스판 오늘 탭의 '광고 보고 응원하기' 카드를 누름 (광고를 지원하는 토스 앱에서만 카드가 보임) | 없음 | `tossAd.tsx` |
|
||||
| `토스광고_노출` (코드 `toss_ad_impression`) | 광고가 실제로 노출됨 (토스 SDK `impression`, 토스 광고 그룹의 노출 이력과 같은 시점) | 없음 | `tossAd.tsx` |
|
||||
| `토스광고_닫음` (코드 `toss_ad_dismiss`) | 광고를 닫음 (토스 안드로이드 5.255.0 은 닫힘 이벤트가 오지 않아 안 보내질 수 있음) | 없음 | `tossAd.tsx` |
|
||||
| `토스광고_실패` (코드 `toss_ad_fail`) | 광고를 불러오지 못하거나 보여 주지 못함 | `stage: 'load' \| 'show' \| 'timeout'`(불러오기 실패·보여 주기 실패·10초 넘게 불러오는 중) | `tossAd.tsx` |
|
||||
| `설치배너_닫기` (코드 `install_banner_close`) | '홈 화면에 추가' 띠를 × 로 닫음 | 없음 | `installBanner.tsx` |
|
||||
| `맨위로_누름` (코드 `top_button`) | 오른쪽 아래 둥근 버튼(내려갔을 때 '맨 위로')을 눌러 맨 위로 올라감 | `page`(누른 화면: `today`·`sky`·`gak`·`week`·`season`·`talk` 등) | `BLayout.tsx` `FloatButton` |
|
||||
| `문의_누름` (코드 `contact_click`) | 문의 창에서 전화·이메일을 누름 (창 열림은 `창_열기`의 `sheet: 'contact'`) | `method: 'phone' \| 'email'` | `Sheets.tsx` `ContactSheet` |
|
||||
|
||||
@@ -114,7 +114,7 @@ function FloatButton() {
|
||||
type="button"
|
||||
onClick={down ? toTop : () => open({ type: 'contact' })}
|
||||
aria-label={down ? '맨 위로' : '문의하기'}
|
||||
className="fixed right-[max(12px,calc((100%-440px)/2+12px))] bottom-[calc(80px+env(safe-area-inset-bottom,0px))] z-20 size-14 cursor-pointer rounded-full drop-shadow-[0_6px_10px_rgb(40_48_74/0.22)]"
|
||||
className="fixed right-[max(12px,calc((100%-440px)/2+12px))] bottom-[calc(80px+var(--sab))] z-20 size-14 cursor-pointer rounded-full drop-shadow-[0_6px_10px_rgb(40_48_74/0.22)]"
|
||||
>
|
||||
<Ic name={down ? 'top' : 'contact'} className="size-full" />
|
||||
</button>
|
||||
@@ -306,13 +306,13 @@ function Shell() {
|
||||
</div>
|
||||
)}
|
||||
<div className="fixed inset-x-0 top-0 z-[19] h-[env(safe-area-inset-top,0px)] transition-colors duration-1400" style={{ backgroundColor: NOTCH_BG[kind] }} aria-hidden="true" />
|
||||
<div className="relative mx-auto min-h-dvh max-w-[440px] overflow-x-clip pb-[calc(104px+env(safe-area-inset-bottom,0px))]">
|
||||
<div className="relative mx-auto min-h-dvh max-w-[440px] overflow-x-clip pb-[calc(104px+var(--sab))]">
|
||||
<TopBar />
|
||||
<main className="relative z-[1]">
|
||||
<Outlet />
|
||||
</main>
|
||||
<FloatButton />
|
||||
<nav aria-label="주요 메뉴" className="b-tabbar fixed inset-x-0 bottom-0 z-30 grid grid-cols-5 border-t px-[max(4px,calc((100%-432px)/2))] pt-[7px] pb-[calc(8px+env(safe-area-inset-bottom,0px))] backdrop-blur-[10px]">
|
||||
<nav aria-label="주요 메뉴" className="b-tabbar fixed inset-x-0 bottom-0 z-30 grid grid-cols-5 border-t px-[max(4px,calc((100%-432px)/2))] pt-[7px] pb-[calc(8px+var(--sab))] backdrop-blur-[10px]">
|
||||
{TABS.map((t) =>
|
||||
t.key === 'today' ? (
|
||||
// 메인 탭: 막대 위로 솟은 큰 주황 동그라미
|
||||
|
||||
@@ -236,7 +236,7 @@ export function CloudMergePage() {
|
||||
// 스택 화면: 머리줄·탭을 덮게 body 로 띄운다(main 이 쌓임 순서를 가둬서). b-app 의 낮 색을 그대로 써 밤에도 밝은 바탕
|
||||
return createPortal(
|
||||
<div className="b-app fixed inset-0 z-[45] touch-none bg-[linear-gradient(#d9edff,#f5faff)]">
|
||||
<div className="mx-auto flex h-full max-w-[440px] flex-col pt-[env(safe-area-inset-top,0px)] pb-[calc(10px+env(safe-area-inset-bottom,0px))] text-(--ink)">
|
||||
<div className="mx-auto flex h-full max-w-[440px] flex-col pt-[env(safe-area-inset-top,0px)] pb-[calc(10px+var(--sab))] text-(--ink)">
|
||||
<div className="flex items-center gap-1 px-3 pt-2">
|
||||
<button type="button" onClick={back} aria-label="뒤로" className={cx('relative grid size-9 shrink-0 cursor-pointer place-items-center rounded-full bg-white/80 text-[22px] font-bold shadow-[0_4px_10px_rgb(40_48_74/0.08)]', TAP44)}>
|
||||
‹
|
||||
|
||||
@@ -496,7 +496,7 @@ function FullCard({ post }: PostProps) {
|
||||
document.body,
|
||||
)}
|
||||
{likeFailed > 0 && createPortal(
|
||||
<p role="alert" className="pointer-events-none fixed inset-x-0 bottom-[calc(88px+env(safe-area-inset-bottom,0px))] z-50 m-0 flex justify-center px-4">
|
||||
<p role="alert" className="pointer-events-none fixed inset-x-0 bottom-[calc(88px+var(--sab))] z-50 m-0 flex justify-center px-4">
|
||||
<span className="rounded-full bg-[rgb(30_36_56/0.82)] px-3.5 py-2 text-[13px] font-bold text-white">{liked ? '좋아요를 취소하지 못했어요' : '좋아요를 반영하지 못했어요'}. 다시 해 주세요.</span>
|
||||
</p>,
|
||||
document.body,
|
||||
|
||||
@@ -159,7 +159,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
|
||||
className={cx('b-sheet-dialog b-app fixed inset-x-0 top-auto bottom-0 m-0 mx-auto max-h-[86dvh] w-full max-w-[440px] overflow-visible bg-transparent p-0 text-(--ink)', closing && 'b-sheet-closing')}
|
||||
>
|
||||
{shown && (
|
||||
<div className="b-sheet flex max-h-[86dvh] flex-col rounded-t-[22px] bg-white pb-[env(safe-area-inset-bottom,0px)]">
|
||||
<div className="b-sheet flex max-h-[86dvh] flex-col rounded-t-[22px] bg-white pb-[var(--sab)]">
|
||||
<div className="relative border-b border-(--line) px-4 pt-2 pb-2.5 text-center">
|
||||
<div className="mx-auto mb-2.5 h-1 w-10 rounded-full bg-(--line)" aria-hidden="true" />
|
||||
<h3 className="m-0 text-[15px] font-extrabold">{title}</h3>
|
||||
|
||||
@@ -30,6 +30,7 @@ import { ShortsRail } from './Shorts'
|
||||
import { FeedComposer, TalkPost } from './talk'
|
||||
import { useTopicTalks } from './talkState'
|
||||
import { TomorrowFeed } from './TomorrowFeed'
|
||||
import { TossAdCard } from './tossAd'
|
||||
import { useLandingAbout, useRegion } from './regionContext'
|
||||
import { useSheet } from './sheetContext'
|
||||
import { useSky } from './skyContext'
|
||||
@@ -641,6 +642,7 @@ export function TodayPage() {
|
||||
<StateBox load={load} onRetry={() => feed.refetch()} empty="오늘 계산된 각이 없어요." hold={<PostCardSkel />} className="inset-x-3 top-3 bottom-1" />
|
||||
)}
|
||||
<InstallBanner />
|
||||
<TossAdCard />
|
||||
<div>
|
||||
{load === 'loading' && <PostsSkel />}
|
||||
{/* 글이 없거나 못 받아도 스켈레톤 두 장 자리는 그대로 둔다 */}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { IS_TOSS, showTossAd, tossAdSupported, type TossAdStage } from '../lib/platform'
|
||||
import { track } from '../lib/analytics'
|
||||
import { Ic } from './ui'
|
||||
|
||||
type State = 'idle' | 'loading' | 'thanks' | 'error'
|
||||
|
||||
/** 토스판 오늘 탭의 '광고 보고 응원하기' 카드. 보상은 없고, 누르면 전면 광고를 한 번 보여 준다. 토스 앱이 광고를 지원할 때만 보인다 */
|
||||
export function TossAdCard() {
|
||||
const [supported, setSupported] = useState(false)
|
||||
const [state, setState] = useState<State>('idle')
|
||||
const impressed = useRef(false)
|
||||
|
||||
useEffect(() => {
|
||||
if (!IS_TOSS) return
|
||||
tossAdSupported().then(setSupported, (e: unknown) => console.warn('[toss-ad] 지원 여부를 확인하지 못함', e))
|
||||
}, [])
|
||||
|
||||
if (!IS_TOSS || !supported) return null
|
||||
|
||||
const start = () => {
|
||||
if (state === 'loading') return
|
||||
setState('loading')
|
||||
impressed.current = false
|
||||
track('toss_ad_click', {})
|
||||
showTossAd(() => {
|
||||
impressed.current = true
|
||||
setState('thanks')
|
||||
track('toss_ad_impression', {})
|
||||
}).then(
|
||||
() => track('toss_ad_dismiss', {}),
|
||||
(e: Error & { stage?: TossAdStage }) => {
|
||||
console.warn('[toss-ad] 광고를 보여 주지 못함', e)
|
||||
track('toss_ad_fail', { stage: e.stage ?? 'show' })
|
||||
// 이미 노출된 뒤의 오류는 고맙다는 안내를 그대로 둔다
|
||||
if (!impressed.current) setState('error')
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<aside aria-label="광고 보고 날씨각 응원하기" className="mt-3.5 flex items-center gap-2.5 border-y border-(--line) bg-white py-2.5 pr-3 pl-3">
|
||||
<Ic name="rabbit" className="w-10 shrink-0" />
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="m-0 font-jua text-[15px] leading-snug">{state === 'thanks' ? '응원해 주셔서 고마워요!' : '광고 보고 날씨각 응원하기'}</p>
|
||||
<p className="m-0 text-xs leading-snug font-semibold text-(--ink2)">
|
||||
{state === 'error' ? '지금은 광고를 불러오지 못했어요. 잠시 뒤 다시 눌러 주세요.' : state === 'thanks' ? '덕분에 날씨각을 계속 만들어 갈 수 있어요.' : '광고 한 번이 날씨각을 이어 가는 힘이 돼요.'}
|
||||
</p>
|
||||
</div>
|
||||
<span className="shrink-0 rounded-md border border-(--line) px-1.5 py-0.5 text-[11px] font-bold text-(--ink3)">광고</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={start}
|
||||
disabled={state === 'loading'}
|
||||
className="shrink-0 cursor-pointer rounded-full bg-(--orange) px-3.5 py-1.5 text-[13px] font-extrabold text-white disabled:cursor-default disabled:opacity-60"
|
||||
>
|
||||
{state === 'loading' ? '불러오는 중…' : state === 'thanks' ? '한 번 더' : '보기'}
|
||||
</button>
|
||||
</aside>
|
||||
)
|
||||
}
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
@layer base {
|
||||
html {
|
||||
/* 화면 아래 안전 영역(홈 바). 토스는 웹뷰가 이미 그 위에서 끝나서 main.tsx 가 0 으로 바꾼다 */
|
||||
--sab: env(safe-area-inset-bottom, 0px);
|
||||
word-break: keep-all;
|
||||
overflow-wrap: break-word;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
|
||||
@@ -51,6 +51,56 @@ export async function tossLocation(ask: boolean): Promise<TossLocation | null> {
|
||||
return { lat: coords.latitude, lon: coords.longitude }
|
||||
}
|
||||
|
||||
/** 토스 보상형 광고 그룹 ID. 토스 빌드의 VITE_TOSS_REWARD_AD_ID(frontend/.env.toss)로 준다. 없으면 토스 테스트 ID 로 동작해, 개발 중에 라이브 ID 를 쓰지 않는다 */
|
||||
const TOSS_TEST_REWARD_AD = 'ait-ad-test-rewarded-id'
|
||||
const TOSS_REWARD_AD = (import.meta.env.VITE_TOSS_REWARD_AD_ID as string | undefined) || TOSS_TEST_REWARD_AD
|
||||
const TOSS_AD_LOAD_MS = 10000
|
||||
|
||||
/** 토스 앱 버전이 광고를 지원하는지 */
|
||||
export async function tossAdSupported(): Promise<boolean> {
|
||||
const { loadFullScreenAd, showFullScreenAd } = await sdk()
|
||||
return loadFullScreenAd.isSupported() && showFullScreenAd.isSupported()
|
||||
}
|
||||
|
||||
export type TossAdStage = 'load' | 'show' | 'timeout'
|
||||
|
||||
function adError(stage: TossAdStage, cause: unknown): Error & { stage: TossAdStage } {
|
||||
return Object.assign(new Error(cause instanceof Error ? cause.message : String(cause)), { stage })
|
||||
}
|
||||
|
||||
/** 토스: 광고를 불러와 바로 보여 준다. 노출되면 onImpression, 닫히면 끝난다. 불러오지 못하거나 보여 주지 못하면 stage 가 붙은 오류로 끝난다 */
|
||||
export function showTossAd(onImpression: () => void): Promise<void> {
|
||||
return sdk().then(
|
||||
({ loadFullScreenAd, showFullScreenAd }) =>
|
||||
new Promise<void>((resolve, reject) => {
|
||||
const stopLoad = loadFullScreenAd({
|
||||
options: { adGroupId: TOSS_REWARD_AD },
|
||||
onEvent: (e) => {
|
||||
if (e.type !== 'loaded') return
|
||||
clearTimeout(timer)
|
||||
showFullScreenAd({
|
||||
options: { adGroupId: TOSS_REWARD_AD },
|
||||
onEvent: (ev) => {
|
||||
if (ev.type === 'impression') onImpression()
|
||||
else if (ev.type === 'dismissed') resolve()
|
||||
else if (ev.type === 'failedToShow') reject(adError('show', '광고를 보여 주지 못함'))
|
||||
},
|
||||
onError: (err) => reject(adError('show', err)),
|
||||
})
|
||||
},
|
||||
onError: (err) => {
|
||||
clearTimeout(timer)
|
||||
reject(adError('load', err))
|
||||
},
|
||||
})
|
||||
const timer = setTimeout(() => {
|
||||
stopLoad()
|
||||
reject(adError('timeout', '광고를 불러오는 데 시간이 너무 오래 걸림'))
|
||||
}, TOSS_AD_LOAD_MS)
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
/* ---------- 앱 브리지: 웹이 앱(네이티브)에 일을 시키고 답을 받는다 ---------- */
|
||||
|
||||
type AppReply = { id: number; ok: boolean; data?: unknown; error?: string }
|
||||
|
||||
@@ -7,11 +7,14 @@ import './api/setup'
|
||||
import App from './App.tsx'
|
||||
import './b/install'
|
||||
import { track } from './lib/analytics'
|
||||
import { APP_VERSION, IS_APP } from './lib/platform'
|
||||
import { APP_VERSION, IS_APP, IS_TOSS } from './lib/platform'
|
||||
|
||||
// index.html 의 첫 화면이 멈췄을 때 앱 파일까지는 실행됐는지 가르는 표시
|
||||
;(window as Window & { __appStarted?: boolean }).__appStarted = true
|
||||
|
||||
// 안드로이드 토스 웹뷰는 하단 내비게이션 바 위에서 끝나는데도 safe-area-inset-bottom 을 알려 줘, 그대로 쓰면 탭바 아래가 비어 보인다 (갤럭시 Z 플립 5 에서 약 56px). 아이폰 토스는 확인하지 못해 그대로 둔다
|
||||
if (IS_TOSS && /Android/i.test(navigator.userAgent)) document.documentElement.style.setProperty('--sab', '0px')
|
||||
|
||||
// iOS는 user-scalable=no를 무시해서 두 손가락 확대를 직접 막는다
|
||||
for (const type of ['gesturestart', 'gesturechange']) document.addEventListener(type, (e) => e.preventDefault(), { passive: false })
|
||||
|
||||
|
||||
@@ -56,6 +56,13 @@ export type Events<Sheet extends string = string> = {
|
||||
game_round: { round: number; score: number; logged_in: boolean }
|
||||
game_over: { round: number; score: number; best: boolean; drops: number }
|
||||
toss_intro_start: Record<string, never>
|
||||
/** 토스판 '광고 보고 응원하기' 카드를 누름 */
|
||||
toss_ad_click: Record<string, never>
|
||||
/** 광고가 실제로 노출됨 (토스 SDK impression) */
|
||||
toss_ad_impression: Record<string, never>
|
||||
toss_ad_dismiss: Record<string, never>
|
||||
/** stage: 불러오지 못함(load)·보여 주지 못함(show)·10초 넘게 불러오는 중(timeout) */
|
||||
toss_ad_fail: { stage: 'load' | 'show' | 'timeout' }
|
||||
install_banner_close: Record<string, never>
|
||||
top_button: { page: string }
|
||||
contact_click: { method: 'phone' | 'email' }
|
||||
@@ -110,6 +117,10 @@ export const GA_NAME: Record<keyof Events, string> = {
|
||||
game_round: '게임_라운드',
|
||||
game_over: '게임_끝',
|
||||
toss_intro_start: '토스소개_시작',
|
||||
toss_ad_click: '토스광고_누름',
|
||||
toss_ad_impression: '토스광고_노출',
|
||||
toss_ad_dismiss: '토스광고_닫음',
|
||||
toss_ad_fail: '토스광고_실패',
|
||||
install_banner_close: '설치배너_닫기',
|
||||
top_button: '맨위로_누름',
|
||||
contact_click: '문의_누름',
|
||||
|
||||
Reference in new issue
Block a user