desktop-app/main.go
Rama main · réplica de lectura del repositorio original.
package main
import (
"embed"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
)
//go:embed all:frontend/dist
var assets embed.FS
func main() {
// Create an instance of the app structure
app := NewApp()
// Create application with options
err := wails.Run(&options.App{
Title: "Stockroom",
Width: 1280,
Height: 800,
// design-system.md §12: below this the shell stops being the shell.
MinWidth: 1024,
MinHeight: 700,
AssetServer: &assetserver.Options{
Assets: assets,
},
BackgroundColour: &options.RGBA{R: 0x17, G: 0x19, B: 0x1A, A: 1}, // --ground
OnStartup: app.startup,
Bind: []interface{}{
app,
},
})
if err != nil {
println("Error:", err.Error())
}
}