fix darkmode toggle

This commit is contained in:
Ryan Stafford 2024-04-18 19:16:01 -04:00
parent dd03bad6b2
commit 8a5b2094b7

View file

@ -770,6 +770,9 @@ func Settings(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
} else if r.FormValue("darkmode") != "" {
setCookie(w, "", "Dark", "1")
*state.Dark = true
} else {
setCookie(w, "", "Dark", "0")
*state.Dark = false
}
if r.FormValue("shownsfw") != "" {
setCookie(w, "", "ShowNSFW", "1")