Backup bows out of the phone — the zipped-share future replaces it, later
IndieBackup comes out whole: the package, the Backup directory, the Settings section, the .kanbanbackup document type and its onOpenURL restore path. Settings is now the About section alone. The Files-app keys stay — they serve local-board visibility, not backups. Board sharing as a zipped archive is the planned replacement and is deliberately not started here. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
import SwiftUI
|
||||
import IndieAbout
|
||||
import IndieBackup
|
||||
|
||||
/// Backup/restore (indie-backup skill) and the About section (indie-about skill).
|
||||
/// The About section (indie-about skill).
|
||||
struct SettingsTabView: View {
|
||||
@Environment(BoardIndexStore.self) private var index
|
||||
@Environment(\.backupController) private var backupController
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
Form {
|
||||
backupSection
|
||||
|
||||
// Last section by convention. The version label doubles as the changelog link,
|
||||
// which is why the changelog sits in its dedicated slot and not in `documents`.
|
||||
// Same voice as the Mac app's `AboutBox.configuration`; the changelog itself is
|
||||
// the phone app's own (see project.yml — separate product, separate 1.0).
|
||||
Section {
|
||||
@@ -27,36 +21,7 @@ struct SettingsTabView: View {
|
||||
.navigationTitle("Settings")
|
||||
}
|
||||
// Idempotent (BoardIndexStore.start()), and harmless if BoardsTabView already called it —
|
||||
// this tab can be the first one the user opens, and `backupController` only ever appears
|
||||
// once `index.home` resolves.
|
||||
// this tab can be the first one the user opens.
|
||||
.task { index.start() }
|
||||
}
|
||||
|
||||
/// `backupController` is `nil` until `MobileApp` has a resolved `CloudHome` to build one from
|
||||
/// — which is also exactly the condition under which there is a `Documents/` folder to back
|
||||
/// up. Everything short of that gets the same quiet explanation rather than a section that
|
||||
/// looks broken or, worse, a crash on a nil root.
|
||||
@ViewBuilder
|
||||
private var backupSection: some View {
|
||||
if let backupController {
|
||||
BackupsSectionView(controller: backupController)
|
||||
} else {
|
||||
Section {
|
||||
switch index.phase {
|
||||
case .idle, .loading:
|
||||
LabeledContent("Backup") {
|
||||
ProgressView()
|
||||
}
|
||||
case .ready:
|
||||
// `.ready` is both cases now: the run with no iCloud at all, and the runloop turn
|
||||
// `backupController` lags `index.home` by (MobileApp's `.task(id:)`). Backup is
|
||||
// still iCloud-only — a known gap now that local boards exist.
|
||||
Label("Backup and restore need iCloud Drive.", systemImage: "icloud.slash")
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
} footer: {
|
||||
Text("Sign into iCloud in Settings, then come back here to back up your boards.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user