add Logout, OnLogout to server manager and hook up OnLogout callbacks
This commit is contained in:
@@ -64,8 +64,15 @@ func NewMainWindow(fyneApp fyne.App, appName string, app *backend.App, size fyne
|
||||
m.Window.SetTitle(song.Title)
|
||||
})
|
||||
app.ServerManager.OnServerConnected(func() {
|
||||
m.BrowsingPane.EnableNavigationButtons()
|
||||
m.Router.OpenRoute(HomePage)
|
||||
})
|
||||
app.ServerManager.OnLogout(func() {
|
||||
m.BrowsingPane.DisableNavigationButtons()
|
||||
m.BrowsingPane.SetPage(nil)
|
||||
m.BrowsingPane.ClearHistory()
|
||||
// TODO: show prompt for login
|
||||
})
|
||||
m.addNavigationButtons()
|
||||
m.addShortcuts()
|
||||
return m
|
||||
|
||||
Reference in New Issue
Block a user