feat: config grouped by area, with per-provider timeouts and an update interval (#60)
Regroups the config, while there are no users to migrate: - `ui`: icons, sourcesView, collapseGroups, loadDelay, expiryWarningDays - `values`: revealTimeout, hideOnBlur, clipboardClear - `storage`: cache, history - `updates`: autoCheck (was updateCheck), autoCheckInterval (new, 24h by default), updateSources (was releases) - `providers.timeout` (was timeout), plus `timeout` on azure, databricks and repos overriding it for that provider; `--timeout` still sets them all - `sharing` (was share), in the config and in a repo's `.lazysecrets.yaml` docs/config.md and the pages naming these keys are updated. Reviewed-on: #60 Co-authored-by: Karl-Einar Bergstrøm <karl-einarb@outlook.com>
This commit was merged in pull request #60.
This commit is contained in:
1 parent
5cd6d90555
commit
10d1fc63c7
24 files changed
+308
-172
No files matched your search
@@ -20,7 +20,8 @@ type Updater struct {
|
||||
}
|
||||
|
||||
// updateEvery is how often lazysecrets looks for a newer release on its
|
||||
// own; within that, the last answer (in the state file) is used.
|
||||
// own unless the config says otherwise; within that, the last answer (in
|
||||
// the state file) is used.
|
||||
const updateEvery = 24 * time.Hour
|
||||
|
||||
type updateMsg struct {
|
||||
@@ -35,14 +36,14 @@ type installedMsg struct {
|
||||
}
|
||||
|
||||
// startUpdateCheck sets up the startup look for a newer release: the
|
||||
// state file's answer when it looked less than a day ago, else a quiet
|
||||
// state file's answer when it looked within updateEvery, else a quiet
|
||||
// look at the server (fetchOnStart, for Init).
|
||||
func (m *Model) startUpdateCheck() {
|
||||
if m.updater == nil || !m.updateCheck {
|
||||
return
|
||||
}
|
||||
last := m.store.UpdateCheck()
|
||||
if m.now().Sub(last.At) < updateEvery {
|
||||
if m.now().Sub(last.At) < m.updateEvery {
|
||||
m.offer(update.Release{Tag: last.Tag, Body: last.Notes, URL: last.URL})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user