add about dialog

This commit is contained in:
Drew Weymouth
2023-03-04 18:47:05 -08:00
parent d3b58147de
commit fbf68dff08
8 changed files with 174 additions and 2 deletions
+9
View File
@@ -22,6 +22,7 @@ type Controller struct {
// if not nil, this popup should be hidden when escape is pressed
EscapablePopUp *widget.PopUp
AppVersion string
MainWindow fyne.Window
App *backend.App
NavHandler NavigationHandler
@@ -206,6 +207,14 @@ func (m *Controller) PromptForLoginAndConnect() {
pop.Show()
}
func (c *Controller) ShowAboutDialog() {
dlg := dialogs.NewAboutDialog(c.AppVersion)
pop := widget.NewModalPopUp(dlg, c.MainWindow.Canvas())
dlg.OnDismiss = pop.Hide
c.ClosePopUpOnEscape(pop)
pop.Show()
}
func (c *Controller) trySetPasswordAndConnectToServer(server *backend.ServerConfig, password string) error {
if err := c.App.ServerManager.SetServerPassword(server, password); err != nil {
log.Printf("error setting keyring credentials: %v", err)