refactor login workflow, can now re-prompt for password if missing
This commit is contained in:
@@ -6,12 +6,10 @@ import (
|
||||
"supersonic/ui/browsing"
|
||||
"supersonic/ui/controller"
|
||||
"supersonic/ui/os"
|
||||
"supersonic/ui/widgets"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/driver/desktop"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/dweymouth/go-subsonic/subsonic"
|
||||
)
|
||||
|
||||
@@ -78,16 +76,6 @@ func NewMainWindow(fyneApp fyne.App, appName string, app *backend.App, size fyne
|
||||
return m
|
||||
}
|
||||
|
||||
func (m *MainWindow) PromptForFirstServer(cb func(string, string, string, string)) {
|
||||
d := widgets.NewAddServerForm("Connect to Server")
|
||||
pop := widget.NewModalPopUp(d, m.Canvas())
|
||||
d.OnSubmit = func() {
|
||||
pop.Hide()
|
||||
cb(d.Nickname, d.Host, d.Username, d.Password)
|
||||
}
|
||||
pop.Show()
|
||||
}
|
||||
|
||||
func (m *MainWindow) addNavigationButtons() {
|
||||
m.BrowsingPane.AddNavigationButton(res.ResHeadphonesInvertPng, func() {
|
||||
m.Router.OpenRoute(browsing.NowPlayingRoute())
|
||||
|
||||
Reference in New Issue
Block a user