Respect (or remember) appearance preference on splash screen
Is your feature request related to a problem? Please describe. My appearance preference is set to "auto", to follow my system's appearance, which is set to dark mode most of the time. But when i open Phanpy (installed as a PWA on my phone), the splash screen is in long mode.
This is my splash screen, though my phone is on dark mode and Phanpy's appearance set to auto:
Describe the solution you'd like Phanpy should remember whether it was in light or dark mode last time it was opened, and display the splash screen accordingly. Only then it should check the user's preference and make a change to the app's appearance, if relevant.
Hello! I'd happily give this a try to fix it if I may, as it flashes at me too 😅
I have had a look in the codebase but can't see where this splash screen is. It'll probably be easier to find once I get it running locally - but any tips are welcome!
@sarajw the splash screen is auto-generated by Chrome Android itself (and maybe other Chrome-based browsers on other platforms too) — this doesn't happen on Mobile Safari on iOS as it'll just load the page without splash.
Probably 2 ways to solve this:
- Add splash screen to override the auto-generated one. Issues: static image(s), multiple resolutions 😩, no "dark mode" settings for webmanifest yet (I used to keep track of this development but haven't look at it recently, so some web apps use a single "safe" color of neither light nor dark background - or just dark by default)
- Wait for Chrome to intelligently auto-generate dark-mode splash screen 🙈 - makes sense because this bug affects all PWAs.
Ahuh, understandable then that it is the way it is for now. You already have several logo resolutions in public though, so may not have to add any more for a webmanifest :)
Maybe I can find or make relevant issue to post to Android somewhere!
Hey so I found the manifest settings here: https://github.com/cheeaun/phanpy/blob/main/vite.config.js (from line 77)
I've added a line to darken the splash background in my fork: https://github.com/sarajw/phanpy/blob/main/vite.config.js
I can imagine that someone using it on a phone might find a dark background jarring too - so I'm not immediately going to turn it into a pull request. But it works :)