-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
45 lines (37 loc) · 852 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
"context"
"embed"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
backendpkg "ynab-monthly-expenses-manager/backend"
)
//go:embed all:frontend/dist
var assets embed.FS
//go:embed build/appicon.png
var icon []byte
func main() {
app := backendpkg.SetupApp()
backend := backendpkg.SetupBackend()
wails.Run(&options.App{
Title: "YNAB Monthly Expenses Manager",
Width: 1024,
Height: 768,
DisableResize: true,
AssetServer: &assetserver.Options{
Assets: assets,
},
OnStartup: func(context context.Context) {
app.Startup(context)
backend.Startup(context)
},
OnDomReady: func(context context.Context) {
backend.DomReady(context)
},
Bind: []interface{}{
app,
backend,
},
})
}