-
-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the option for an automatic dark mode based on the device status #1836
Conversation
The mov isn't working for me but this is a great idea! |
Uploaded an .mp4 that seems to be working now @dschaper! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why custom-auto
when it is referring to default
templates? This may cause confusion.
scripts/pi-hole/php/theme.php
Outdated
@@ -16,6 +16,8 @@ | |||
$available_themes["default-light"] = array("Pi-hole default theme (light, default)", false, "default-light"); | |||
$available_themes["default-dark"] = array("Pi-hole midnight theme (dark)", true, "default-dark"); | |||
$available_themes["default-darker"] = array("Pi-hole deep-midnight theme (dark)", true, "default-darker"); | |||
// Option to have the theme go with the device dark mode setting, always set the background to black to avoid flashing | |||
$available_themes["custom-auto"] = array("Pi-hole auto theme (light/dark)", true, "custom-auto"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$available_themes["custom-auto"] = array("Pi-hole auto theme (light/dark)", true, "custom-auto"); | |
$available_themes["default-auto"] = array("Pi-hole auto theme (light/dark)", true, "default-auto"); |
And rename custom-auto.css
to default-auto.css
Signed-off-by: = <[email protected]> Signed-off-by: Alex Lamond <[email protected]>
Corrected naming conventions for files and theme name Co-authored-by: DL6ER <[email protected]> Signed-off-by: Alex Lamond <[email protected]>
Signed-off-by: Alex Lamond <[email protected]>
f7943b4
to
7aace09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we (a) should make this the default choice (can be done in another PR) and (b) when the first user will request the auto theme to be darker ;-) |
@DL6ER I considered (a) but wasn't sure if it would be accepted by the userbase or seen as an annoyance and having to go in and set it to specific dark or light? For (b) I'm sure I could find some time to implement a light theme / dark theme dropdown section to choose which one applies in each case. Thoughts? The other option I'm considering is getting rid of the radio buttons and making it a drop down choice for the light and dark mode themes. Will make a pull request as requested and let the Pi-Hole team decide on if it will be usable |
I'm not sure if it'd be seen as an "annoyance". How often do you switch between light and dark? I don't ever switch and use dark throughout the entire day - but this may not be the typical use case. I wonder how you imagine such a dropdown choice, would it be three drop downs in the end?
I do really wonder if it would be worth the effort. We have only one light theme and never had a user submitting a custom theme at all since we have implemented this ability more than one year ago (based on a feature request, btw). |
Just something I noticed when reviewing another PR, @AlexLamond - not sure if this is intentional but in auto dark mode the top left background colour remains blue, where the midnight theme is grey
|
This was the other PR I was reviewing, BTW. I've also noticed that the auto mode does not change the address bar colour on Android chrome, where the manual modes do.: Default Theme: Midnight Theme: Deep Midnight: Auto (light): Auto (dark): |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4-released/49544/1 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
Signed-off-by: = [email protected]
By submitting this pull request, I confirm the following:
{please fill any appropriate checkboxes, e.g: [X]}
{Please ensure that your pull request is for the 'devel' branch!}
git rebase
)git commit --signoff
)What does this PR aim to accomplish?:
{A detailed description, screenshots (if necessary), as well as links to any relevant GitHub issues}
This PR adds the ability to set the PiHole theme to auto, enabling users to have light mode when the device is in light mode and dark mode when the device is in dark mode
How does this PR accomplish the above?:
{A detailed description (such as a changelog) and screenshots (if necessary) of the implemented fix}
The PR adds an additional CSS document that applies the relevant theme on the device theme and adds the option to the themes.php file
What documentation changes (if any) are needed to support this PR?:
None
PiHole-Auto-Light-Dark.mp4