62 lines
1.4 KiB
Go
62 lines
1.4 KiB
Go
package main
|
|
|
|
import (
|
|
"embed"
|
|
"log"
|
|
|
|
"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"
|
|
|
|
"daily-timer/internal/app"
|
|
"daily-timer/internal/storage"
|
|
)
|
|
|
|
//go:embed all:frontend/dist
|
|
var assets embed.FS
|
|
|
|
func main() {
|
|
store, err := storage.New()
|
|
if err != nil {
|
|
log.Fatalf("failed to initialize storage: %v", err)
|
|
}
|
|
|
|
application := app.New(store)
|
|
|
|
if err := wails.Run(&options.App{
|
|
Title: "Daily Timer",
|
|
Width: 480,
|
|
Height: 900,
|
|
MinWidth: 480,
|
|
MinHeight: 400,
|
|
MaxWidth: 480,
|
|
StartHidden: true,
|
|
AssetServer: &assetserver.Options{
|
|
Assets: assets,
|
|
},
|
|
BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
|
|
OnStartup: application.Startup,
|
|
OnDomReady: application.OnDomReady,
|
|
OnShutdown: application.Shutdown,
|
|
Bind: []interface{}{
|
|
application,
|
|
},
|
|
Mac: &mac.Options{
|
|
TitleBar: &mac.TitleBar{
|
|
TitlebarAppearsTransparent: true,
|
|
HideTitle: true,
|
|
HideTitleBar: false,
|
|
FullSizeContent: true,
|
|
UseToolbar: false,
|
|
},
|
|
About: &mac.AboutInfo{
|
|
Title: "Daily Timer",
|
|
Message: "Meeting timer with participant tracking\n\n© 2026 Movida.Biz",
|
|
},
|
|
},
|
|
}); err != nil {
|
|
log.Fatalf("error running application: %v", err)
|
|
}
|
|
}
|