mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-18 06:39:54 +00:00
[client/ui-wails] Wire up enforced-update tray menu item
Surface the Fyne UI's "Download latest version" / "Install version X.Y.Z" About-submenu entry in the Wails tray. The item starts hidden and is revealed by onUpdateAvailable when the daemon emits EventUpdateAvailable; opt-in updates open github.com/netbirdio/netbird/releases/latest in the browser, enforced updates surface the in-window /update progress page and call TriggerUpdate on the daemon. Also lift every user-facing string and external URL in tray.go into named const declarations at the top of the file, so future copy edits and (eventual) localisation have a single source of truth. The /update React route is the frontend counterpart and is owned by the React side of the refactor.
This commit is contained in:
@@ -93,6 +93,7 @@ func main() {
|
||||
settings := services.NewSettings(conn)
|
||||
profiles := services.NewProfiles(conn)
|
||||
peers := services.NewPeers(conn, app.Event)
|
||||
update := services.NewUpdate(conn)
|
||||
notifier := notifications.New()
|
||||
|
||||
app.RegisterService(application.NewService(connection))
|
||||
@@ -100,7 +101,7 @@ func main() {
|
||||
app.RegisterService(application.NewService(services.NewNetworks(conn)))
|
||||
app.RegisterService(application.NewService(profiles))
|
||||
app.RegisterService(application.NewService(services.NewDebug(conn)))
|
||||
app.RegisterService(application.NewService(services.NewUpdate(conn)))
|
||||
app.RegisterService(application.NewService(update))
|
||||
app.RegisterService(application.NewService(peers))
|
||||
app.RegisterService(application.NewService(notifier))
|
||||
|
||||
@@ -128,7 +129,7 @@ func main() {
|
||||
window.Hide()
|
||||
})
|
||||
|
||||
tray = NewTray(app, window, connection, settings, profiles, peers, notifier)
|
||||
tray = NewTray(app, window, connection, settings, profiles, peers, notifier, update)
|
||||
listenForShowSignal(context.Background(), tray)
|
||||
|
||||
peers.Watch(context.Background())
|
||||
|
||||
Reference in New Issue
Block a user