Add connect-on-launch and notarized desktop release packaging
This commit is contained in:
@@ -91,7 +91,7 @@ func Run(version string, autostart bool) {
|
||||
fyne.Do(a.refresh)
|
||||
}
|
||||
}()
|
||||
if autostart {
|
||||
if autostart || a.cfg.AutoConnect {
|
||||
a.start()
|
||||
}
|
||||
a.app.Run()
|
||||
@@ -370,8 +370,13 @@ func (a *App) settingsDialog() {
|
||||
api := widget.NewEntry()
|
||||
api.SetText(a.cfg.API)
|
||||
api.SetPlaceHolder("https://tunnel.example.com")
|
||||
autoConnect := widget.NewCheck("Connect on launch", nil)
|
||||
autoConnect.SetChecked(a.cfg.AutoConnect)
|
||||
dialog.NewForm("Settings", "Save", "Cancel",
|
||||
[]*widget.FormItem{widget.NewFormItem("API", api)},
|
||||
[]*widget.FormItem{
|
||||
widget.NewFormItem("API", api),
|
||||
widget.NewFormItem("Startup", autoConnect),
|
||||
},
|
||||
func(ok bool) {
|
||||
if !ok {
|
||||
return
|
||||
@@ -382,6 +387,7 @@ func (a *App) settingsDialog() {
|
||||
return
|
||||
}
|
||||
a.cfg.API = normalized
|
||||
a.cfg.AutoConnect = autoConnect.Checked
|
||||
if err := a.cfg.Save(a.configPath); err != nil {
|
||||
a.showError(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user