freifunk / meshviewer

Visualization for Freifunk open mesh network nodes
GNU Affero General Public License v3.0
9 stars 16 forks source link

Night mode gone since v12.4.0 #97

Open 1977er opened 10 months ago

1977er commented 10 months ago

Expected Behavior

In v12.3.0 the config (see below) kicks in the dark mode. Black background, inverted textcolors etc.

Current Behavior

Since v12.4.0 this does not work anymore. The normal light mode css stuff is used.

Steps to Reproduce

My config looks like this:

{
    "mapLayers": [
      {
        "config": {
          "mode": "night",
  1. use mode: night in one of your mapLayers
  2. reload the website and switch to the given mapLayer

Context

Your Environment

Screenshots

maurerle commented 3 months ago

@MyIgel @weeman1337 could you have a look at this please? :)

maurerle commented 3 months ago

One could also add a watch to window.matchMedia("(prefers-color-scheme: dark)"); when fixing this, so that one can have mode: auto in the config as well

genofire commented 5 days ago

Was removed here:

https://github.com/freifunk/meshviewer/commit/860cdd9acf4738236b0e5a515c3c4555fd9a9ffe#diff-0eb547304658805aad788d320f10bf1f292797b5e6d745a3bf617584da017051L28


i believe a window.matchMedia("(prefers-color-scheme: dark)") should switch the layer to a mode with night ...