1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package main
- import (
- "embed"
- "github.com/astaxie/beego"
- "github.com/wailsapp/wails/v2"
- "github.com/wailsapp/wails/v2/pkg/options"
- "github.com/wailsapp/wails/v2/pkg/options/assetserver"
- "nginx-ui/desktop"
- _ "nginx-ui/server/init"
- )
- var assets embed.FS
- func main() {
-
- api := desktop.NewApi()
- go beego.Run()
-
- err := wails.Run(&options.App{
- Title: "nginx-ui-desktop",
- Width: 1200,
- Height: 800,
- AssetServer: &assetserver.Options{
- Assets: assets,
-
-
- Handler: desktop.NewApiHandler(nil),
- },
- BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
- OnStartup: api.Startup,
- Bind: []interface{}{},
- })
- if err != nil {
- println("Error:", err.Error())
- }
- }
|