Add auto updater configuration (#122)

Adds a new set of configurations for managing whether the app will
automatically check for updates. Ports over the auto update code from
the old app. In this version, the main difference is that updates can be
manually checked for using a menu bar item, even if auto updates are
disabled.
This commit is contained in:
Evan Simkowitz
2024-07-18 16:55:04 -07:00
committed by GitHub
parent 776ccd7da0
commit c47e17903d
9 changed files with 277 additions and 14 deletions
+10
View File
@@ -36,11 +36,17 @@ type BlockHeaderOpts struct {
ShowBlockIds bool `json:"showblockids"`
}
type AutoUpdateOpts struct {
Enabled bool `json:"enabled"`
IntervalMs uint32 `json:"intervalms"`
}
type SettingsConfigType struct {
MimeTypes map[string]MimeTypeConfigType `json:"mimetypes"`
Term TerminalConfigType `json:"term"`
Widgets []WidgetsConfigType `json:"widgets"`
BlockHeader BlockHeaderOpts `json:"blockheader"`
AutoUpdate AutoUpdateOpts `json:"autoupdate"`
}
func getSettingsConfigDefaults() SettingsConfigType {
@@ -97,5 +103,9 @@ func getSettingsConfigDefaults() SettingsConfigType {
},
},
},
AutoUpdate: AutoUpdateOpts{
Enabled: true,
IntervalMs: 3600000,
},
}
}