[v3 mac] Add IsDarkMode to application and JS runtime. Add Common.ThemeChanged event

This commit is contained in:
Lea Anthony
2023-08-18 17:36:14 +10:00
parent 79deb37675
commit ffed41553a
25 changed files with 630 additions and 487 deletions
@@ -0,0 +1,18 @@
package application
import (
"net/http"
)
func (m *MessageProcessor) processSystemMethod(method string, rw http.ResponseWriter, r *http.Request, window *WebviewWindow, params QueryParams) {
switch method {
case "IsDarkMode":
m.json(rw, globalApplication.IsDarkMode())
default:
m.httpError(rw, "Unknown system method: %s", method)
}
m.Info("Runtime:", "method", "System."+method)
}