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} -