⬆️ Upgrade wails v3 from Alpha 9 to Alpha 10

This commit is contained in:
2025-07-10 10:01:52 +08:00
parent b52e067d50
commit 4d62da912a
42 changed files with 1220 additions and 511 deletions

View File

@@ -75,7 +75,7 @@ func main() {
// 'Mac' options tailor the window when running on macOS.
// 'BackgroundColour' is the background colour of the window.
// 'URL' is the URL that will be loaded into the webview.
mainWindow := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
mainWindow := app.Window.NewWithOptions(application.WebviewWindowOptions{
Title: "voidraft",
Width: 700,
Height: 800,
@@ -92,7 +92,7 @@ func main() {
Theme: application.SystemDefault,
},
BackgroundColour: application.NewRGB(27, 38, 54),
URL: "/#/",
URL: "/",
})
mainWindow.Center()
@@ -122,7 +122,7 @@ func main() {
go func() {
for {
now := time.Now().Format(time.RFC1123)
app.EmitEvent("time", now)
app.Event.Emit("time", now)
time.Sleep(time.Second)
}
}()