feat: update settings move under updates, with an interval
updates.autoCheck (was updateCheck) and updates.updateSources (was releases) sit together with updates.autoCheckInterval, a duration (24h by default) for how often lazysecrets looks for a newer release on its own.
This commit is contained in:
9 files changed
+66
-34
No files matched your search
@@ -225,6 +225,10 @@ Flags:
|
||||
if cfg.LoadDelay != nil {
|
||||
loadDelay = *cfg.LoadDelay
|
||||
}
|
||||
var updateEvery time.Duration // 0: the app's default, a day
|
||||
if cfg.Updates.AutoCheckInterval != nil {
|
||||
updateEvery = *cfg.Updates.AutoCheckInterval
|
||||
}
|
||||
if !set["icons"] {
|
||||
switch {
|
||||
case os.Getenv("LAZYSECRETS_ICONS") != "":
|
||||
@@ -379,8 +383,9 @@ Flags:
|
||||
ExpiryWarning: time.Duration(expiryDays) * 24 * time.Hour,
|
||||
HideOnBlur: config.On(cfg.HideOnBlur),
|
||||
HandlerSetup: setup,
|
||||
Updater: updater(cfg.Releases),
|
||||
UpdateCheck: config.On(cfg.UpdateCheck),
|
||||
Updater: updater(cfg.Updates.UpdateSources),
|
||||
UpdateCheck: config.On(cfg.Updates.AutoCheck),
|
||||
UpdateEvery: updateEvery,
|
||||
Keys: &keymap,
|
||||
Commands: cfg.CustomCommands,
|
||||
Version: versionString(),
|
||||
|
||||
Reference in new issue
Block a user