1.6.0 #9: auto-backup programado a iCloud Drive/Archivos
El BackupService (export JSON v3 lossless a local + iCloud ubiquity, retención, restore, premium-gated) ya existía de 1.1.0 pero solo era manual. Añadido lo automático: - BackupService.runScheduledBackupIfNeeded() (config vía UserDefaults, gate por backupsEnabled+premium, respeta frecuencia). - Disparo en foreground (scenePhase .active) en background queue. - Frecuencia Off/Diario/Semanal/Mensual + fecha del último backup en Settings (SettingsViewModel.autoBackupFrequencyDays + updateAutoBackupFrequency). - Strings en 7 idiomas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L2p3gUZRNWW388rWFRjiU7
This commit is contained in:
@@ -534,6 +534,27 @@ struct SettingsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
if viewModel.backupsEnabled {
|
||||
Picker("Auto Backup", selection: Binding(
|
||||
get: { viewModel.autoBackupFrequencyDays },
|
||||
set: { viewModel.updateAutoBackupFrequency($0) }
|
||||
)) {
|
||||
Text("Off").tag(0)
|
||||
Text("Daily").tag(1)
|
||||
Text("Weekly").tag(7)
|
||||
Text("Monthly").tag(30)
|
||||
}
|
||||
if let last = viewModel.lastAutoBackupDate {
|
||||
HStack {
|
||||
Text("Last auto backup")
|
||||
Spacer()
|
||||
Text(last, style: .date)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.font(.caption)
|
||||
}
|
||||
}
|
||||
|
||||
NavigationLink {
|
||||
CategoriesView()
|
||||
} label: {
|
||||
|
||||
Reference in New Issue
Block a user