RaspAP / raspap-webgui

Simple wireless AP setup & management for Debian-based devices
https://raspap.com/
GNU General Public License v3.0
4.43k stars 786 forks source link

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

Closed nsdoukos closed 6 months ago

nsdoukos commented 6 months ago

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