import SwiftUI import AppKit struct LicenseRequiredView: View { @EnvironmentObject private var licensing: LicensingManager @Environment(\.openSettings) private var openSettings var body: some View { VStack(spacing: 20) { Image(systemName: "lock.shield.fill") .font(.system(size: 54, weight: .medium)) .foregroundStyle(Color.accentColor) VStack(spacing: 7) { Text(licensing.statusTitle) .font(.title2.bold()) Text(licensing.statusDetail) .foregroundStyle(.secondary) .multilineTextAlignment(.center) .frame(maxWidth: 520) } HStack(spacing: 12) { Button("Buy Rsync Studio…") { openPurchasePage() } .buttonStyle(.borderedProminent) .controlSize(.large) Button("Open Licence Settings") { openSettings() } .controlSize(.large) } Text("Your jobs and history remain on this Mac. Rsync Studio does not delete local data when a trial expires or a licence is removed.") .font(.caption) .foregroundStyle(.secondary) .multilineTextAlignment(.center) .frame(maxWidth: 520) } .padding(48) .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color(nsColor: .windowBackgroundColor)) } private func openPurchasePage() { guard let raw = Bundle.main.object(forInfoDictionaryKey: "RsyncStudioPurchaseURL") as? String, let url = URL(string: raw), url.scheme?.lowercased() == "https" else { return } NSWorkspace.shared.open(url) } }