2023-01-10 16:28:27 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"embed"
|
|
|
|
|
2023-01-14 19:47:29 +00:00
|
|
|
"github.com/garraflavatra/mongodup/internal/app"
|
2023-01-10 16:28:27 +00:00
|
|
|
"github.com/wailsapp/wails/v2"
|
|
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
|
|
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
2023-01-16 15:56:16 +00:00
|
|
|
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
2023-01-10 16:28:27 +00:00
|
|
|
)
|
|
|
|
|
2023-01-16 15:56:16 +00:00
|
|
|
var (
|
|
|
|
//go:embed all:frontend/dist
|
|
|
|
assets embed.FS
|
|
|
|
|
|
|
|
//go:embed build/appicon.png
|
|
|
|
appIcon []byte
|
|
|
|
)
|
2023-01-10 16:28:27 +00:00
|
|
|
|
|
|
|
func main() {
|
2023-01-14 19:47:29 +00:00
|
|
|
app := app.NewApp()
|
2023-01-10 16:28:27 +00:00
|
|
|
|
|
|
|
err := wails.Run(&options.App{
|
2023-01-16 15:56:16 +00:00
|
|
|
Title: "Mongodup",
|
|
|
|
Width: 1000,
|
|
|
|
Height: 600,
|
|
|
|
MinWidth: 1000,
|
|
|
|
MinHeight: 600,
|
|
|
|
BackgroundColour: &options.RGBA{R: 0, G: 0, B: 139, A: 1},
|
|
|
|
OnStartup: app.Startup,
|
|
|
|
|
2023-01-10 16:28:27 +00:00
|
|
|
AssetServer: &assetserver.Options{
|
|
|
|
Assets: assets,
|
|
|
|
},
|
2023-01-16 15:56:16 +00:00
|
|
|
|
2023-01-10 16:28:27 +00:00
|
|
|
Bind: []interface{}{
|
|
|
|
app,
|
|
|
|
},
|
2023-01-16 15:56:16 +00:00
|
|
|
|
|
|
|
Mac: &mac.Options{
|
|
|
|
TitleBar: mac.TitleBarHiddenInset(),
|
|
|
|
WebviewIsTransparent: true,
|
|
|
|
WindowIsTranslucent: true,
|
|
|
|
About: &mac.AboutInfo{
|
|
|
|
Title: "Mongodup - MongoDB client",
|
|
|
|
Message: "© 2023 Romein van Buren",
|
|
|
|
Icon: appIcon,
|
|
|
|
},
|
|
|
|
},
|
2023-01-10 16:28:27 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
println("Error:", err.Error())
|
|
|
|
}
|
|
|
|
}
|