dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Light theme is always set for new visitor

Open camaeel opened this issue 3 years ago • 2 comments

  1. I created a themes.json file:
    {
      "themes": [
        {
          "label": "Dark",
          "value": 0,
          "mainColor": "#ffffff",
          "accentColor": "#999999",
          "backgroundColor": "#000000"
        },
        {
          "label": "Lime",
          "value": 8,
          "mainColor": "#aabbc3",
          "accentColor": "#aeea00",
          "backgroundColor": "#263238"
        },
        {
          "label": "Tron",
          "value": 10,
          "mainColor": "#effbff",
          "accentColor": "#6ee2ff",
          "backgroundColor": "#242b33"
        }
      ]
    }
    
  2. I open a new private tab

Result: The page is shown using Light theme, even if it is not in the themes.json file. It would be great if I can either control which theme is used as default from conf files or just use the first one on the list.

camaeel avatar Dec 12 '21 12:12 camaeel

I am also surprised by the behaviour. The setting should set it as a default for everyone (in my opinion). I suspect currently it is stored in a cookie?

KillerTic avatar Jan 10 '22 12:01 KillerTic

It is stored in the localStorage. When I enter for the first time (private session window) I have in my localStorage only one value:

theme=dark-theme

but the whole page is still black letters on white background.

To change to dark I need to:

  1. open settings
  2. Switch to light theme
  3. Switch to dark theme
  4. APPLY

Then the screen is black, and in localStorage I see 2 entries:

theme=dark-theme
dark-theme={"label":"Dark","value":0,"mainColor":"#ffffff","accentColor":"#999999","backgroundColor":"#000000"}

camaeel avatar Jan 21 '22 19:01 camaeel