diff --git a/src/app.html b/src/app.html index 59afad6..0136c35 100644 --- a/src/app.html +++ b/src/app.html @@ -2,7 +2,7 @@ - + @@ -38,6 +38,17 @@ } } catch(e) { /* ignore malformed cookie */ } } + // Feed route: set dark background immediately (before JS hydrates) so the iOS + // black-translucent status bar sees the correct reel-bg color on cold start. + if (window.location.pathname === '/') { + document.documentElement.classList.add('feed-context'); + var pref = m && m[1] !== 'system' ? m[1] : 'system'; + var isDark = pref === 'dark' || (pref !== 'light' && window.matchMedia('(prefers-color-scheme: dark)').matches); + var reelBg = isDark ? '#0d0d0d' : '#1c1c1c'; + document.querySelectorAll('meta[name="theme-color"]').forEach(function(el) { + el.setAttribute('content', reelBg); + }); + } })(); diff --git a/src/lib/components/ActionSidebar.svelte b/src/lib/components/ActionSidebar.svelte index b0a7232..a7fafd3 100644 --- a/src/lib/components/ActionSidebar.svelte +++ b/src/lib/components/ActionSidebar.svelte @@ -5,6 +5,7 @@ import HeartIcon from 'phosphor-svelte/lib/HeartIcon'; import ChatIcon from 'phosphor-svelte/lib/ChatIcon'; import ArrowSquareOutIcon from 'phosphor-svelte/lib/ArrowSquareOutIcon'; + import MusicDisc from './MusicDisc.svelte'; const { favorited, @@ -15,6 +16,12 @@ muted = true, uiHidden = false, isOwn = false, + albumArt = null, + spotifyUrl = null, + appleMusicUrl = null, + youtubeMusicUrl = null, + active = false, + paused = false, onsave, oncomment, onreactionhold, @@ -28,6 +35,12 @@ muted?: boolean; uiHidden?: boolean; isOwn?: boolean; + albumArt?: string | null; + spotifyUrl?: string | null; + appleMusicUrl?: string | null; + youtubeMusicUrl?: string | null; + active?: boolean; + paused?: boolean; onsave: () => void; oncomment: () => void; onreactionhold?: (x: number, y: number) => void; @@ -121,9 +134,7 @@ > {#if reactedEmoji && reactedEmoji !== '❤️' && REACTION_MAP.has(reactedEmoji)} - {@const def = REACTION_MAP.get(reactedEmoji)!} - {@const ReactionIcon = def.component} - + {reactedEmoji} {:else} {/if} @@ -148,26 +159,30 @@ {/if} - - - - - - + {#if albumArt} + + {:else} + + + + + + + {/if} diff --git a/src/lib/components/CommentPrompt.svelte b/src/lib/components/CommentPrompt.svelte new file mode 100644 index 0000000..35a8bb3 --- /dev/null +++ b/src/lib/components/CommentPrompt.svelte @@ -0,0 +1,48 @@ + + + + + diff --git a/src/lib/components/CommentRow.svelte b/src/lib/components/CommentRow.svelte index a7d2b2a..54fa25d 100644 --- a/src/lib/components/CommentRow.svelte +++ b/src/lib/components/CommentRow.svelte @@ -93,9 +93,10 @@ + + + Faves + Settings @@ -165,6 +172,10 @@ activitySheetOpen.set(false)} /> {/if} +{#if $addVideoModalOpen} + addVideoModalOpen.set(false)} /> +{/if} + diff --git a/src/routes/(app)/settings/+page.svelte b/src/routes/(app)/settings/+page.svelte index ef994ae..cf328c8 100644 --- a/src/routes/(app)/settings/+page.svelte +++ b/src/routes/(app)/settings/+page.svelte @@ -340,6 +340,8 @@ {pushLoading} {prefs} {prefsLoading} + isStandaloneMode={$isStandalone} + isIos={platform === 'ios'} onTogglePush={togglePush} onUpdatePref={handleUpdatePref} /> diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b7787f3..3df9c08 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -36,6 +36,9 @@