Add dark mode support#84
Conversation
Added theme setting functionality and applied theme changes based on user preference and system settings.
There was a problem hiding this comment.
Pull request overview
This PR adds dark mode support to the app loader with three theme options: light, dark, and device (follows system preference). The implementation handles theme persistence in settings, dynamic theme application, and extends dark mode styling to app customizer iframes.
Key Changes:
- Added theme setting with three modes: light, dark, and device
- Implemented theme application logic that respects user preferences and system settings
- Applied dark mode styling to app customizer iframes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| const selectTheme = document.getElementById("settings-theme"); | ||
| // Update theme selector | ||
| selectTheme.value = SETTINGS.theme; |
There was a problem hiding this comment.
Please could you surround this in if (selectTheme)? Then it won't break things like EspruinoApps that don't have a theme selector box
|
Thanks! This looks good - but please could you fix the lint errors that come up on https://github.com/espruino/EspruinoAppLoaderCore/pull/84/files and remove the |
|
Thanks! |
|
I think this has altered
|
|
I shouldn't really have merged this before, but I didn't really look and realise that espruino/BangleApps#4103 made the interface.html barely usable in some cases (like in @RKBoss6 do you have any plans to add tweaks to espruino/BangleApps#4103 soon to make the interface.html look better, or shall I back this change out of the app loader core until it's sorted? It seems you may have moved on to some other things like the calorie counting? |
|
Yeah, I'm quite busy at the moment, so it may be better for the time being to revert the changes until I can get tweaks made.... Sorry! |
|
Ok - just done! Annoyingly I don't see a way to re-open this, but it's referenced from espruino/BangleApps#4103 so we can re-add it from there |
|
Thanks! Sorry about the confusion, I'll try to get something in to fix it soon. |

In conjunction with #4103, this helps add dark mode to the app loader. Adding dark mode helps significantly with eye strain, and blending into the device's UI. Check it out on my personal app loader! and let me know of any suggestions/comments.
Specifically, this PR handles ensuring the right theme is displayed, and theming of app html customizer iframes.
Screenshots: