From 5fb8997ab9195276af69c93511ebfcf85b59609f Mon Sep 17 00:00:00 2001 From: Stefan Lange-Hegermann Date: Sat, 27 Sep 2025 18:35:29 +0200 Subject: [PATCH] cleaner with less clutter --- Cable/CalculatorView.swift | 14 ++------------ Cable/ContentView.swift | 6 +----- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Cable/CalculatorView.swift b/Cable/CalculatorView.swift index 441f650..11f0d08 100644 --- a/Cable/CalculatorView.swift +++ b/Cable/CalculatorView.swift @@ -241,7 +241,7 @@ struct CalculatorView: View { let countryCode = rawCountryCode?.uppercased() let regionName = countryCode.flatMap { Locale.current.localizedString(forRegionCode: $0) ?? $0 } - let buttonTitle = regionName.map { "Review parts for \($0)" } ?? "Review parts" + let buttonTitle = "Review parts" let identifier = "bom-\(savedLoad.name)-\(savedLoad.timestamp.timeIntervalSince1970)" return AffiliateLinkInfo( @@ -504,10 +504,6 @@ struct CalculatorView: View { @ViewBuilder private func affiliateLinkSection(info: AffiliateLinkInfo) -> some View { VStack(alignment: .leading, spacing: 12) { - Text("Need the hardware?") - .font(.caption) - .foregroundColor(.secondary) - Button { presentedAffiliateLink = info } label: { @@ -524,12 +520,6 @@ struct CalculatorView: View { } .buttonStyle(.plain) - if let regionName = info.regionName { - Text("Configured for \(regionName).") - .font(.caption2) - .foregroundColor(.secondary) - } - Text(info.affiliateURL != nil ? "Tapping above shows a full bill of materials before opening the affiliate link. Purchases may support VoltPlan." : "Tapping above shows a full bill of materials with shopping searches to help you source parts.") .font(.caption2) .foregroundColor(.secondary) @@ -850,7 +840,7 @@ private struct BillOfMaterialsView: View { } Section { - Text(info.affiliateURL != nil ? "Purchases through the affiliate link may support VoltPlan." : "Amazon searches are provided to help you source comparable parts.") + Text("Purchases through affiliate links may support VoltPlan.") .font(.footnote) .foregroundColor(.secondary) .padding(.vertical, 4) diff --git a/Cable/ContentView.swift b/Cable/ContentView.swift index 6543d9b..e0c5776 100644 --- a/Cable/ContentView.swift +++ b/Cable/ContentView.swift @@ -1256,11 +1256,7 @@ private struct SystemBillOfMaterialsView: View { } private var footerMessage: String { - if loads.contains(where: { $0.affiliateURLString != nil }) { - return "Affiliate links may support VoltPlan; other rows open Amazon searches for sourcing guidance." - } else { - return "Amazon searches are provided to help you source comparable parts for this system." - } + return "Purchases through affiliate links may support VoltPlan." } private var dateFormatter: DateFormatter {