itchio / itch

🎮 The best way to play your itch.io games
https://itch.io/app
MIT License
2.31k stars 198 forks source link

Create "light mode" theme #2959

Open jls47 opened 8 months ago

jls47 commented 8 months ago

Hopefully resolves #164 . Implements a number of changes in color scheme and adds a couple new logo .svgs for use in the top left and login screen of the app. Can be toggled by the "light mode" (now changed from "bright mode") checkbox that's now in the preferences menu.

The reason this says -hopefully- is because part of the changes includes changing the user agent used to render the webview (in /src/renderer/pages/BrowserPage/index.tsx). Rather than {useragent.userAgent()}, I changed it to that string returned by the function but removed all mention of kitch and itch when the bright mode checkbox is selected. While this prevents the need for JS injection and consequent theme flashing, it does seem to affect what shows up on the home "explore" screen as a result. I'd love to explore some ways to get this working if possible.

Screenshot from 2023-10-13 14-26-56 Screenshot from 2023-10-13 14-27-02

jls47 commented 8 months ago

If I may propose a solution-could we set it up so that adding something like "itch-light kitch-light" to the user agent would produce the same functionality minus the forced dark_theme class getting added to the body?

For what it's worth, this does not appear to affect whether or not games can be installed, just whether games are filtered to the user's OS by default and whether "install app" shows up on the home page.

Screenshot from 2023-10-16 14-07-51