You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
747 B
44 lines
747 B
package main
|
|
|
|
import (
|
|
"embed"
|
|
"log"
|
|
"net/http"
|
|
|
|
"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 components
|
|
var assets embed.FS
|
|
|
|
//go:embed build/appicon.png
|
|
var icon []byte
|
|
var version = "0.0.0"
|
|
|
|
func main() {
|
|
app := NewApp()
|
|
router := NewRouter()
|
|
|
|
err := wails.Run(&options.App{
|
|
Title: "snackbar",
|
|
Width: 1040,
|
|
Height: 768,
|
|
StartHidden: true,
|
|
AssetServer: &assetserver.Options{
|
|
Assets: assets,
|
|
Middleware: func(next http.Handler) http.Handler {
|
|
router.NotFound(next.ServeHTTP)
|
|
return router
|
|
},
|
|
},
|
|
Bind: []interface{}{
|
|
app,
|
|
},
|
|
})
|
|
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|
|
|