Implement system theme auto-detection via prefers-color-scheme#78
Merged
thehack904 merged 4 commits intomainfrom Feb 15, 2026
Merged
Implement system theme auto-detection via prefers-color-scheme#78thehack904 merged 4 commits intomainfrom
thehack904 merged 4 commits intomainfrom
Conversation
- Add detectSystemTheme() function to detect prefers-color-scheme - Auto-detect system theme on first visit (no saved preference) - Add "Auto (System)" option to theme menu - Support dynamic theme switching when system preference changes - Maintain backward compatibility with existing theme preferences Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
- Remove redundant lightModeQuery listener - Fix condition to only auto-update when 'auto' is explicitly selected Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
- Remove redundant light mode check - fall through to default instead Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add dark/light theme auto-detect in UI
Implement system theme auto-detection via prefers-color-scheme
Feb 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds automatic dark/light theme detection based on OS/browser preference using CSS
prefers-color-schememedia query.Changes
base.htmlapplies theme before paintImplementation
Added
detectSystemTheme()usingwindow.matchMedia('(prefers-color-scheme: dark)'):Theme resolution logic:
MediaQuery change listener updates theme dynamically only when 'auto' explicitly selected.
UI Updates
Added "Auto (System)" to theme selector menus (desktop + mobile).
Light mode (auto-detected)
Dark mode (manual)
Auto mode
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
iptv.lan/usr/bin/python python app.py(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.