mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v3 mac] Add IsDarkMode to application and JS runtime. Add Common.ThemeChanged event
This commit is contained in:
@@ -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)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user