New updates

This commit is contained in:
Mark Gregory
2026-09-09 08:23:43 +01:00
parent 868604b848
commit 5b9c19c52f
107 changed files with 11126 additions and 8 deletions
+18 -1
View File
@@ -10,6 +10,7 @@ struct SettingsView: View {
@Query(sort: \SyncJob.name) private var jobs: [SyncJob]
@Query(sort: \SyncRun.startedAt, order: .reverse) private var runs: [SyncRun]
@EnvironmentObject private var automation: BackgroundSyncCoordinator
@EnvironmentObject private var licensing: LicensingManager
@AppStorage("defaultSSHUsername") private var defaultSSHUsername = NSUserName()
@AppStorage("defaultSSHKeyPath") private var defaultSSHKeyPath = ""
@AppStorage("defaultSSHPort") private var defaultSSHPort = 22
@@ -120,6 +121,9 @@ struct SettingsView: View {
}
Section("Support & Updates") {
Button("Buy Rsync Studio…") { openCommercialURL(infoKey: "RsyncStudioPurchaseURL") }
Button("Manage Licence Online…") { openCommercialURL(infoKey: "RsyncStudioPortalURL") }
Button("Support…") { openCommercialURL(infoKey: "RsyncStudioSupportURL") }
Button("Export Diagnostics…") { exportDiagnostics() }
Text("Diagnostics contain app/macOS/rsync versions, redacted job configuration and recent failures. Private keys and credentials are never exported.")
.font(.caption)
@@ -139,8 +143,12 @@ struct SettingsView: View {
}
.formStyle(.grouped)
.tabItem { Label("General", systemImage: "gearshape") }
LicenseView()
.environmentObject(licensing)
.tabItem { Label("Licence", systemImage: "key") }
}
.frame(width: 650, height: 455)
.frame(width: 680, height: 500)
.onAppear {
KeychainStore.delete("defaultSSHPassword")
launchAtLogin = SMAppService.mainApp.status == .enabled
@@ -173,6 +181,15 @@ struct SettingsView: View {
}
}
private func openCommercialURL(infoKey: String) {
guard let raw = Bundle.main.object(forInfoDictionaryKey: infoKey) as? String,
let url = URL(string: raw), url.scheme == "https" else {
updateStatus = "This commercial service URL has not been configured for this build."
return
}
NSWorkspace.shared.open(url)
}
private func checkForUpdates() {
isCheckingUpdates = true
Task {