Files
Termind/TFI/Features/MobileProView.swift
T
Kaede Akino c2958a05b3 Add iOS workspaces and shared feature services
Share Vault, persistence, SSH/SFTP, forwarding, and SwiftUI components across platforms. Add mobile editors, terminal input, standalone Assistant, Metrics navigation, transfers, and a unified Live Activity with host system icons.

Validation: 35 iOS tests and 100 focused macOS tests pass; formatting and zh-Hans checks pass. The full macOS run reports 14 issues in the documented timing, Keychain, and popover suites. Remaining Assistant tool and CloudKit work is tracked in Memory/MOBILE_ROLLOUT.md.
2026-09-11 13:47:16 +08:00

40 lines
1.6 KiB
Swift

import SwiftUI
import TermindInfrastructure
import TermindRemoteInfrastructure
struct MobileProView: View {
@Bindable var pro: ProAccessController
@Environment(\.dismiss) private var dismiss
var body: some View {
NavigationStack {
Form {
Section("Termind Pro") {
Label("Assistant", systemImage: "sparkles")
Label("iCloud Sync", systemImage: "icloud")
Label("Unlimited Metrics", systemImage: "gauge.with.dots.needle.33percent")
Label("Remote MCP", systemImage: "network")
}
Section {
if pro.hasProAccess {
Label("Pro Active", systemImage: "checkmark.seal.fill")
} else {
Button {
Task { await pro.purchase() }
} label: {
LabeledContent("Upgrade to Pro", value: pro.displayPrice ?? "")
}
.disabled(!pro.canPurchase)
if pro.canStartTrial { Button("Start Free Trial") { Task { await pro.startTrial() } } }
}
Button("Restore Purchases") { Task { await pro.restorePurchases() } }.disabled(pro.isProcessing)
if pro.isProcessing { ProgressView() }
if let message = pro.message { Text(message).foregroundStyle(.secondary) }
}
}
.navigationTitle("Termind Pro")
.toolbar { Button("Done") { dismiss() } }
}.presentationDetents([.large])
}
}