Don't displayed button "dark mode"
Yarrax opened this issue · 10 comments
I use redmine 4.0.5.stable. After install redmine_dark on sema desktops i can't find dark mode button:
- on my wosrkstation with centos 7 in firefox 91.10.0esr;
- on windows desktopn with firefox 106.0.5;
- on my opensuse station with firefox 100.0.2.
I disable all extensions, but has no effect. Is it a bug in plugin?
I confirm under 4.2, there's no button for activation/deactivation
Hi
I test the plugin on redmine 4.2 and 4.0 and i have a link "dark mode"
For test i use docker ... my Dockerfile is
FROM redmine:4.2
WORKDIR /usr/src/redmine/plugins
RUN git clone https://github.com/fraoustin/redmine_dark.git
WORKDIR /usr/src/redmine/
i build my image and run
docker build -t myredmine .
docker run -p 3000:3000 myredmine
can you check html code of your main page an search dark mode please.
Your redmine is public access, I can see it?
Yes, i found dark mode code:
<script src="[/plugin_assets/redmine_dark/javascripts/dark.js?1668457606](view-source:https://npp-elar.su:444/plugin_assets/redmine_dark/javascripts/dark.js?1668457606)"></script>if i use Alex skin
<script src="[/plugin_assets/redmine_dark/javascripts/dark.js?1668457606](view-source:https://npp-elar.su:444/plugin_assets/redmine_dark/javascripts/dark.js?1668457606)"></script>If i use standart skin.
Our redmine is public, but i cant use your plugin at worktime, sorry :(
If it will help i can save and public html-code of main page with dark_plugin
on firefox i have a button ... but you can check the javascript console please. (F12 for access to console)
I understood what;s wrong!
Firefox has option - themes for sites. If i use "automatic" option + dark firefox theme or "dark" option for sites, "dark mode" button is hidden.
If I use "automatic" option + light frefox there or "light" option - "dark mode" button s dispayed.
It's not obvious, but it doesn't look like a bug. But i have a quiestion - is it possible display this button if i use "dark" option for sites in firefox?
Anyway i whant to say great thanks for this module. My eyes is safe :)
UPD. Also i must say, that dark mode wouldn't work correct if in chrome-based browser will be enabled experimental option "Auto Dark Mode for Web Contents". Firefox work with that option more correct. But "dark mode" button is dispayed in chrome-based browsers with that option.
Hello @Yarrax, I've encountered same issue, it is caused by dark.css file that is checking @media and if dark mode is selected as main theme it will hide mentioned buton and force dark mode in redmine, if you would remove everyting after @media(including @media) it will always show and respect selected mode
@media (prefers-color-scheme: dark) {
#dark {
display:none;
}
Hello @Yarrax, I've encountered same issue, it is caused by dark.css file that is checking @media and if dark mode is selected as main theme it will hide mentioned buton and force dark mode in redmine, if you would remove everyting after @media(including @media) it will always show and respect selected mode @media (prefers-color-scheme: dark) { #dark { display:none; }
thanks! it is working now.
tested by chrome, edge in windows.