RaspAP/raspap-webgui

[Bug]: Night mode switch is not obeyed when changing themes

Closed this issue · 0 comments

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Issue reporting checklist

Operating System

Raspberry Pi OS (32-bit) Lite Bookworm

Quick install or Manual setup?

Quick install

Onboard wireless chipset or external adapter?

Onboard wireless chipset

Hardware

Raspberry Pi 3 Model B+

RaspAP version

3.0 (Latest)

Other software or services running with RaspAP?

No other software

Contact details (optional)

sdoukos@libre.space

Bug description

When the dark mode is selected from the switch and the theme is changed the new theme is the light version

Steps to reproduce

  1. Enable dark mode from the switch.
  2. Change the theme (to RaspAp or Material that support dark mode).

Screenshots

Screenshot 2024-03-21 at 22-11-50 RaspAP WiFi Configuration Portal
Screenshot 2024-03-21 at 22-12-04 RaspAP WiFi Configuration Portal

Additional context

When the theme is changed and the .change() event handler is triggered the state of the night-mode switch button is not taken into account. I have a fix and i will do a pull request.

Relevant log output

No response