logos-innovation-lab / waku-objects-playground

A simple waku chat application to play with and test waku objects
https://chat.wakuplay.im
Apache License 2.0
2 stars 1 forks source link

feat: sets the right theme color (for iPhones) #483

Closed filoozom closed 1 year ago

filoozom commented 1 year ago

This should probably be refactored into a:

<svelte:head>
    <meta name="theme-color" content={$theme.isDark ? 'black' : 'white'} />
</svelte:head>

The issue is that currently there's no easy way to listen to changed about which theme is actually being displayed. If it's the system theme and the system appearance changes, the store does not. The isSystemDark variable and listener from #482 should probably be moved to the store?

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
waku-objects-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 28, 2023 9:27am
filoozom commented 1 year ago

Alright, I put everything in the store. I debated using a derived([$theme, $isSystemDark]), but that would then require the use of two stores for the base color and whether or not the dark theme is activated, so I think this way is a bit cleaner.