cleaner with less clutter

This commit is contained in:
Stefan Lange-Hegermann
2025-09-27 18:35:29 +02:00
parent 0a2789dc44
commit 5fb8997ab9
2 changed files with 3 additions and 17 deletions

View File

@@ -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)

View File

@@ -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 {