49 lines
984 B
Go
49 lines
984 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"embed"
|
||
|
|
|
||
|
|
"github.com/wailsapp/wails/v2"
|
||
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
||
|
|
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
||
|
|
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
||
|
|
)
|
||
|
|
|
||
|
|
//go:embed all:frontend/dist
|
||
|
|
var assets embed.FS
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
app := NewApp()
|
||
|
|
cmdRegistry := NewCommandRegistry()
|
||
|
|
|
||
|
|
err := wails.Run(&options.App{
|
||
|
|
Title: "CSV Tool",
|
||
|
|
Width: 1200,
|
||
|
|
Height: 800,
|
||
|
|
AssetServer: &assetserver.Options{
|
||
|
|
Assets: assets,
|
||
|
|
},
|
||
|
|
BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 255},
|
||
|
|
OnStartup: app.startup,
|
||
|
|
OnDomReady: app.domReady,
|
||
|
|
Bind: []interface{}{
|
||
|
|
app,
|
||
|
|
cmdRegistry,
|
||
|
|
},
|
||
|
|
DragAndDrop: &options.DragAndDrop{
|
||
|
|
EnableFileDrop: true,
|
||
|
|
DisableWebViewDrop: true,
|
||
|
|
},
|
||
|
|
Mac: &mac.Options{
|
||
|
|
TitleBar: mac.TitleBarDefault(),
|
||
|
|
Appearance: mac.NSAppearanceNameAqua,
|
||
|
|
WebviewIsTransparent: false,
|
||
|
|
WindowIsTranslucent: false,
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
if err != nil {
|
||
|
|
println("Error:", err.Error())
|
||
|
|
}
|
||
|
|
}
|