♻️ Refactor code

This commit is contained in:
2025-06-02 13:34:54 +08:00
parent 44f7baad10
commit a516b8973e
53 changed files with 1513 additions and 1094 deletions

21
main.go
View File

@@ -88,28 +88,9 @@ func main() {
URL: "/#/",
})
mainWindow.Center()
settingsWindow := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
Title: "voidraft设置",
Width: 700,
Height: 800,
Hidden: true,
AlwaysOnTop: true,
DisableResize: true,
MinimiseButtonState: application.ButtonHidden,
MaximiseButtonState: application.ButtonHidden,
Mac: application.MacWindow{
Backdrop: application.MacBackdropTranslucent,
TitleBar: application.MacTitleBarHiddenInset,
InvisibleTitleBarHeight: 50,
},
Windows: application.WindowsWindow{},
BackgroundColour: application.NewRGB(27, 38, 54),
URL: "/#/settings",
})
settingsWindow.Center()
// 设置系统托盘
systray.SetupSystemTray(app, mainWindow, settingsWindow, assets)
systray.SetupSystemTray(app, mainWindow, assets)
// Create a goroutine that emits an event containing the current time every second.
// The frontend can listen to this event and update the UI accordingly.