backive/cmd/backive_ui/main.go

33 lines
453 B
Go
Raw Normal View History

2021-10-04 21:56:44 +02:00
package main
2022-03-07 22:18:29 +01:00
import (
2022-06-07 21:20:16 +02:00
"time"
2022-03-07 22:18:29 +01:00
"fyne.io/fyne/v2/app"
2022-03-07 23:24:02 +01:00
"github.com/qwc/backive"
backiveui "github.com/qwc/backive/ui"
)
var (
config backive.Configuration
database backive.Database
2022-03-07 22:18:29 +01:00
)
2021-10-04 21:56:44 +02:00
func main() {
2022-03-07 23:24:02 +01:00
database.Load()
config.Load()
backive.Init(config, database)
app := app.NewWithID("Backive UI")
backiveui.Init(app, nil, config, database)
go func() {
2022-06-07 21:20:16 +02:00
for {
backiveui.NotificationRun()
time.Sleep(time.Second)
}
}()
2022-03-07 22:18:29 +01:00
app.Run()
2021-10-04 21:56:44 +02:00
}