fix: dark mode toggle visibility and add browser theme preference set… #29
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.
Fix dark mode toggle visibility and system theme handling (Redmine 6.1.0)
Summary
This PR fixes two issues affecting the Dark Mode plugin in Redmine 6.1.0:
Details
<li>within the account menu, ensuring it is visible and styled correctly in Redmine 6.1.0.prefers-color-schemeis now optional and controlled via a plugin setting.Configuration
A new plugin setting has been added:
Administration → Plugins → Dark Mode → Configure
Follow browser/OS dark theme preference (default: disabled)
Changes
assets/javascripts/dark.js– Fix toggle insertion into account menuassets/stylesheets/dark.css– Apply system theme conditionallylib/dark_application_hooks.rb– Add body class based on settinginit.rb– Register plugin settingsapp/views/settings/_redmine_dark_settings.html.erb– Settings UIconfig/settings.yml– Settings configurationTesting
Notes
I am not a Ruby specialist; the Ruby changes were implemented with AI assistance and validated through local testing. Feedback and improvements are welcome.
Compatibility