- Schema v2: Note.AudioInfo, .m4a sidecar next to the note JSON in iCloud - AudioRecorderService (iOS/macOS) + SpeechAnalyzer transcription pipeline with enabled-language set and confidence-based auto-pick, re-transcribe menu - Settings > Transcription > Languages with asset download/reserve handling - watchOS app + accessory complication: one-button recorder, WCSession transferFile to phone, WatchInbox staging, direct-upsert ingestion - Player UI, transcription status chips, quick-capture mic in notes list - Version 0.2, changelog + README updated
79 lines
3.0 KiB
Swift
79 lines
3.0 KiB
Swift
import IndieAbout
|
|
import IndieBackup
|
|
import SwiftUI
|
|
|
|
struct SettingsView: View {
|
|
@Environment(SyncEngine.self) private var syncEngine
|
|
@Environment(ContextService.self) private var contextService
|
|
@EnvironmentObject private var backupController: BackupController
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
Form {
|
|
Section("iCloud") {
|
|
HStack {
|
|
Text("Status")
|
|
Spacer()
|
|
switch syncEngine.iCloudStatus {
|
|
case .checking:
|
|
Text("Checking…").foregroundStyle(.secondary)
|
|
case .available:
|
|
Label("Connected", systemImage: "checkmark.icloud")
|
|
.foregroundStyle(.green)
|
|
case .unavailable:
|
|
Label("Unavailable", systemImage: "xmark.icloud")
|
|
.foregroundStyle(.red)
|
|
}
|
|
}
|
|
if let error = syncEngine.lastSyncError {
|
|
Text(error)
|
|
.font(.footnote)
|
|
.foregroundStyle(.red)
|
|
}
|
|
Button("Rebuild Local Cache") {
|
|
Task { await syncEngine.rebuildCache() }
|
|
}
|
|
.disabled(syncEngine.iCloudStatus != .available || syncEngine.isSyncing)
|
|
}
|
|
|
|
Section("Transcription") {
|
|
NavigationLink {
|
|
TranscriptionLanguagesView()
|
|
} label: {
|
|
Label("Languages", systemImage: "character.bubble")
|
|
}
|
|
}
|
|
|
|
Section("Context") {
|
|
ContextSummaryRow(
|
|
context: contextService.current,
|
|
isRefreshing: contextService.isRefreshing
|
|
)
|
|
if contextService.authorizationDenied {
|
|
Text("Location access is off. Notes can still be taken, but they won't resurface by place. Enable location for Notes in Settings.")
|
|
.font(.footnote)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
Button("Refresh Context") {
|
|
Task { await contextService.refresh() }
|
|
}
|
|
.disabled(contextService.isRefreshing)
|
|
}
|
|
|
|
BackupsSectionView(controller: backupController)
|
|
|
|
Section {
|
|
IndieAbout(configuration: .init(
|
|
documents: [
|
|
.license(filename: "LICENSE", extension: "md"),
|
|
.custom(title: "Changelog", filename: "CHANGELOG", extension: "md")
|
|
]
|
|
))
|
|
}
|
|
}
|
|
.formStyle(.grouped)
|
|
.navigationTitle("Settings")
|
|
}
|
|
}
|
|
}
|