feat: 내 각 아이콘·상세, 이야기 내 글·무한 스크롤, 공유 이미지 얇은 띠, 행사 주소 수집
- 내 각: 아이콘 고르기(my_gak.icon), 카드는 아이콘·점수·아쉬운 조건만, 눌러서 상세(시간대·조건별 점수), 공유는 공통 공유 창 - 이야기: 오늘 쓴 내 글 묶음, '내 글' 칩·탭, 무한 스크롤, 사진 카메라 버튼, 지우기 확인, ⋯ 메뉴 하트 옆, 글 시간 서버 계산(1일 전) - 공유 이미지: 1:1·4:5 는 아래 얇은 띠 한 줄로 카드를 크게 - 행사: 수집 때 주소 저장(event.address), 행사 포스트에 장소·주소·기간 - 히어로 말풍선 '오늘 낮은 / 내일 낮은', 내일을 볼 때 배경도 따라감, 달 보름 순간이 낮이면 뜨는 시각으로 - 단풍 지도 피드 맨 위, 행사·계절 띠 포스트 틀 되돌림, 쇼츠 홈 버튼 가림·닫기 버튼, 하단 여백, 회색 글자 대비 - 토스 앱에선 쇼츠 플레이어를 하나만 띄움
This commit is contained in:
1 parent
3a249c509d
commit
ffe6153148
35 files changed
+566
-185
No files matched your search
@@ -35,7 +35,7 @@ import { GoogleButton } from './googleLogin'
|
||||
import { useInstall, useInstallable } from './install'
|
||||
import { InstallSheet } from './installBanner'
|
||||
import { ARTICLE_CAT, SHEET_CLOSE_MS, SHEET_OPEN_MS } from './lib'
|
||||
import { MixSheet } from './myGak'
|
||||
import { MixSheet, MyGakSheet } from './myGak'
|
||||
import { ownPage, useRegion } from './regionContext'
|
||||
import { WeatherWhySheet } from './weatherWhy'
|
||||
import { useSky } from './skyContext'
|
||||
@@ -133,7 +133,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
|
||||
}, [isOpen])
|
||||
|
||||
const then = shown?.type === 'login' ? shown.then : undefined
|
||||
const title = !shown ? '' : shown.type === 'gak' ? gakTitle : shown.type === 'article' ? articleTitle || TITLES.article : shown.type === 'mix' ? (shown.shared ? '받은 각' : '내 각 만들기') : TITLES[shown.type]
|
||||
const title = !shown ? '' : shown.type === 'gak' ? gakTitle : shown.type === 'article' ? articleTitle || TITLES.article : shown.type === 'mix' ? (shown.shared ? '받은 각' : '내 각 만들기') : shown.type === 'myGak' ? '내 각' : TITLES[shown.type]
|
||||
|
||||
return (
|
||||
<dialog
|
||||
@@ -169,6 +169,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
|
||||
{shown.type === 'me' && <MeSheet onDone={onClose} />}
|
||||
{shown.type === 'region' && <RegionSheet onDone={onClose} />}
|
||||
{shown.type === 'mix' && <MixSheet shared={shown.shared} onDone={onClose} />}
|
||||
{shown.type === 'myGak' && <MyGakSheet gak={shown.gak} shot={shown.shot} onDone={onClose} />}
|
||||
{shown.type === 'install' && <InstallSheet />}
|
||||
{shown.type === 'weatherWhy' && <WeatherWhySheet d={shown.why} />}
|
||||
{shown.type === 'talk' && <TalkSheet talk={shown.talk} />}
|
||||
@@ -560,6 +561,7 @@ function ShareSheet({ share }: { share: SharePayload }) {
|
||||
const [toast, setToast] = useState('')
|
||||
const image = images[size]
|
||||
const text = `${share.title} · 날씨각`
|
||||
const url = share.url ?? SITE_URL
|
||||
|
||||
// 고른 크기의 이미지를 미리 만들어 둔다. 누를 때 만들면 아이폰이 공유창을 막는다
|
||||
useEffect(() => {
|
||||
@@ -605,15 +607,15 @@ function ShareSheet({ share }: { share: SharePayload }) {
|
||||
)
|
||||
return
|
||||
}
|
||||
if (navigator.canShare?.({ files: [file], text, url: SITE_URL })) {
|
||||
const copied = navigator.clipboard?.writeText(SITE_URL).then(
|
||||
if (navigator.canShare?.({ files: [file], text, url })) {
|
||||
const copied = navigator.clipboard?.writeText(url).then(
|
||||
() => true,
|
||||
(e: unknown) => {
|
||||
console.error('[share] copy link', e)
|
||||
return false
|
||||
},
|
||||
)
|
||||
navigator.share({ files: [file], title: share.title, text, url: SITE_URL }).then(
|
||||
navigator.share({ files: [file], title: share.title, text, url }).then(
|
||||
async () => {
|
||||
setToast((await copied) ? '보냈어요. 링크도 복사해 뒀어요' : '보냈어요')
|
||||
track('share', { content_type: 'image', item_id: share.title, method: 'share_sheet', ratio: SHARE_SIZES[size].ratio })
|
||||
@@ -635,7 +637,7 @@ function ShareSheet({ share }: { share: SharePayload }) {
|
||||
setToast('이미지를 내려받았어요')
|
||||
return
|
||||
}
|
||||
navigator.clipboard.writeText(`${text} ${SITE_URL}`).then(
|
||||
navigator.clipboard.writeText(`${text} ${url}`).then(
|
||||
() => setToast('이미지를 내려받고 링크를 복사했어요'),
|
||||
() => setToast('이미지를 내려받았어요. 링크 복사는 막혀 있어요'),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user