2023-01-10 17:28:27 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"embed"
|
|
|
|
|
2023-01-14 20:47:29 +01:00
|
|
|
"github.com/garraflavatra/mongodup/internal/app"
|
2023-01-10 17:28:27 +01:00
|
|
|
"github.com/wailsapp/wails/v2"
|
|
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
|
|
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
2023-01-16 16:56:16 +01:00
|
|
|
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
2023-01-10 17:28:27 +01:00
|
|
|
)
|
|
|
|
|
2023-01-16 16:56:16 +01:00
|
|
|
var (
|
|
|
|
//go:embed all:frontend/dist
|
|
|
|
assets embed.FS
|
|
|
|
|
|
|
|
//go:embed build/appicon.png
|
|
|
|
appIcon []byte
|
|
|
|
)
|
2023-01-10 17:28:27 +01:00
|
|
|
|
|
|
|
func main() {
|
2023-01-14 20:47:29 +01:00
|
|
|
app := app.NewApp()
|
2023-01-10 17:28:27 +01:00
|
|
|
|
|
|
|
err := wails.Run(&options.App{
|
2023-01-16 16:56:16 +01: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 17:28:27 +01:00
|
|
|
AssetServer: &assetserver.Options{
|
|
|
|
Assets: assets,
|
|
|
|
},
|
2023-01-16 16:56:16 +01:00
|
|
|
|
2023-01-10 17:28:27 +01:00
|
|
|
Bind: []interface{}{
|
|
|
|
app,
|
|
|
|
},
|
2023-01-16 16:56:16 +01: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 17:28:27 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
println("Error:", err.Error())
|
|
|
|
}
|
|
|
|
}
|