feat(backup): "keep every backup" option — timestamped files per exit

Sub-option of "back up on every exit": when on, backup.Run/RunADIF stamp the
filename with the time (opslog-YYYY-MM-DD-HHMMSS.db) so each run is a distinct
file instead of overwriting the day's snapshot. Rotation still trims to the
newest N (raise Rotation for a longer history). Threaded as a `unique` flag
through runConfiguredBackup/backupLogADIF from BackupSettings.KeepAll
(keyBackupKeepAll); UI sub-checkbox shown only when EveryExit is on.
This commit is contained in:
2026-08-07 12:28:52 +02:00
parent e9feeffdc3
commit 949cc17ed1
5 changed files with 50 additions and 22 deletions
+14 -1
View File
@@ -4368,13 +4368,26 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
/>
<span>{t('bk.zip')}</span>
</label>
<label className="flex items-center gap-2 text-sm cursor-pointer pb-2">
<label className="flex items-center gap-2 text-sm cursor-pointer">
<Checkbox
checked={!!(backupCfg as any).every_exit}
onCheckedChange={(c) => setBackupCfg((b) => ({ ...b, every_exit: !!c } as any))}
/>
<span>{t('bk.everyExit')}</span>
</label>
{!!(backupCfg as any).every_exit && (
<label className="flex items-start gap-2 text-sm cursor-pointer pl-6 pb-2">
<Checkbox
className="mt-0.5"
checked={!!(backupCfg as any).keep_all}
onCheckedChange={(c) => setBackupCfg((b) => ({ ...b, keep_all: !!c } as any))}
/>
<span>
{t('bk.keepAll')}
<span className="block text-xs text-muted-foreground mt-0.5">{t('bk.keepAllHint')}</span>
</span>
</label>
)}
</div>
<div className="border-t border-border/60 pt-3 flex items-center gap-3">