diff --git a/Cable.xcodeproj/project.pbxproj b/Cable.xcodeproj/project.pbxproj index b8f94db..c9efbf7 100644 --- a/Cable.xcodeproj/project.pbxproj +++ b/Cable.xcodeproj/project.pbxproj @@ -405,7 +405,7 @@ CODE_SIGN_ENTITLEMENTS = Cable/Cable.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 32; + CURRENT_PROJECT_VERSION = 34; DEVELOPMENT_TEAM = RE4FXQ754N; ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; @@ -440,7 +440,7 @@ CODE_SIGN_ENTITLEMENTS = Cable/Cable.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 32; + CURRENT_PROJECT_VERSION = 34; DEVELOPMENT_TEAM = RE4FXQ754N; ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; diff --git a/Cable/Base.lproj/Localizable.strings b/Cable/Base.lproj/Localizable.strings index c81eba2..d97c082 100644 --- a/Cable/Base.lproj/Localizable.strings +++ b/Cable/Base.lproj/Localizable.strings @@ -180,6 +180,8 @@ "overview.runtime.title" = "Estimated runtime"; "overview.runtime.unavailable" = "Add battery capacity and load power to estimate runtime."; "overview.system.header.title" = "System Overview"; +"sample.battery.rv.name" = "LiFePO4 house bank"; +"sample.battery.workshop.name" = "Workbench backup battery"; "sample.charger.dcdc.name" = "DC-DC charger"; "sample.charger.shore.name" = "Shore power charger"; "sample.charger.workbench.name" = "Workbench charger"; diff --git a/Cable/Loads/OnboardingInfoView.swift b/Cable/Loads/OnboardingInfoView.swift index 3acc0ec..ccb4fa0 100644 --- a/Cable/Loads/OnboardingInfoView.swift +++ b/Cable/Loads/OnboardingInfoView.swift @@ -57,6 +57,7 @@ struct OnboardingInfoView: View { Spacer() VStack(spacing: 12) { + Spacer() Button(action: onPrimaryAction) { Label(configuration.primaryActionTitle, systemImage: configuration.primaryActionIcon) .frame(maxWidth: .infinity) @@ -76,6 +77,7 @@ struct OnboardingInfoView: View { } } .padding(.horizontal, 24) + .frame(minHeight: 140) } .padding(.vertical, 24) .frame(maxWidth: .infinity, maxHeight: .infinity) diff --git a/Cable/Overview/SystemOverviewView.swift b/Cable/Overview/SystemOverviewView.swift index 2ec6426..a1b4b24 100644 --- a/Cable/Overview/SystemOverviewView.swift +++ b/Cable/Overview/SystemOverviewView.swift @@ -35,30 +35,7 @@ struct SystemOverviewView: View { VStack(alignment: .leading, spacing: 16) { Text(systemOverviewTitle) .font(.headline.weight(.semibold)) - HStack(spacing: 14) { - ZStack { - RoundedRectangle(cornerRadius: 12, style: .continuous) - .fill(Color.componentColor(named: system.colorName)) - .frame(width: 54, height: 54) - Image(systemName: system.iconName) - .font(.system(size: 24, weight: .semibold)) - .foregroundStyle(Color.white) - } - - VStack(alignment: .leading, spacing: 6) { - Text(system.name) - .font(.title3.weight(.semibold)) - .lineLimit(2) - .multilineTextAlignment(.leading) - if !system.location.isEmpty { - Label(system.location, systemImage: "mappin.and.ellipse") - .font(.subheadline) - .foregroundStyle(.secondary) - .labelStyle(.titleAndIcon) - } - } - Spacer() - } + ViewThatFits(in: .horizontal) { HStack(spacing: 16) { @@ -290,7 +267,6 @@ struct SystemOverviewView: View { .foregroundStyle(.secondary) .fixedSize(horizontal: false, vertical: true) } - Button(action: onCreateBattery) { Label(batteryEmptyCreateAction, systemImage: "plus") .frame(maxWidth: .infinity) diff --git a/Cable/UITestSampleData.swift b/Cable/UITestSampleData.swift index 4b9a636..dd9ba32 100644 --- a/Cable/UITestSampleData.swift +++ b/Cable/UITestSampleData.swift @@ -130,6 +130,38 @@ private extension UITestSampleData { [vanFridge, vanLighting, workshopCompressor, workshopCharger].forEach { context.insert($0) } + let vanHouseBattery = SavedBattery( + name: String(localized: "sample.battery.rv.name", comment: "Sample data battery name for the adventure van system"), + nominalVoltage: 12.8, + capacityAmpHours: 200.0, + chemistry: .lithiumIronPhosphate, + chargeVoltage: 14.4, + cutOffVoltage: 10.8, + minimumTemperatureCelsius: -20, + maximumTemperatureCelsius: 60, + iconName: "battery.100.bolt", + colorName: "purple", + system: adventureVan + ) + vanHouseBattery.timestamp = Date(timeIntervalSinceReferenceDate: 1250) + + let workshopBackupBattery = SavedBattery( + name: String(localized: "sample.battery.workshop.name", comment: "Sample data battery name for the workshop system"), + nominalVoltage: 24.0, + capacityAmpHours: 100.0, + chemistry: .agm, + chargeVoltage: 28.8, + cutOffVoltage: 21.0, + minimumTemperatureCelsius: -10, + maximumTemperatureCelsius: 50, + iconName: "battery.75", + colorName: "gray", + system: workshopBench + ) + workshopBackupBattery.timestamp = Date(timeIntervalSinceReferenceDate: 2300) + + [vanHouseBattery, workshopBackupBattery].forEach { context.insert($0) } + let shoreCharger = SavedCharger( name: String(localized: "sample.charger.shore.name", comment: "Sample data name for a shore power charger"), inputVoltage: 230.0, diff --git a/Cable/de.lproj/Localizable.strings b/Cable/de.lproj/Localizable.strings index 6ca5ac9..95693b9 100644 --- a/Cable/de.lproj/Localizable.strings +++ b/Cable/de.lproj/Localizable.strings @@ -217,7 +217,7 @@ "loads.metric.fuse" = "Sicherung"; "loads.metric.length" = "Länge"; "loads.onboarding.subtitle" = "Statte dein System mit Verbrauchern aus und lass **Cable by VoltPlan** die Kabel- und Sicherungsempfehlungen übernehmen."; -"loads.onboarding.title" = "Füge deinen ersten Verbraucher hinzu"; +"loads.onboarding.title" = "Erstelle deinen ersten Verbraucher"; "loads.overview.empty.create" = "Verbraucher hinzufügen"; "loads.overview.empty.library" = "Bibliothek durchsuchen"; "loads.overview.empty.message" = "Füge einen Verbraucher hinzu, um dein System einzurichten."; @@ -240,6 +240,8 @@ "overview.runtime.title" = "Geschätzte Laufzeit"; "overview.runtime.unavailable" = "Trage Batteriekapazität und Leistungsaufnahme ein, um die Laufzeit zu schätzen."; "overview.system.header.title" = "Systemübersicht"; +"sample.battery.rv.name" = "LiFePO4-Bordbatterie"; +"sample.battery.workshop.name" = "Werkbank-Reservebatterie"; "sample.charger.dcdc.name" = "DC-DC-Ladegerät"; "sample.charger.shore.name" = "Landstrom-Ladegerät"; "sample.charger.workbench.name" = "Werkbank-Ladegerät"; diff --git a/Cable/es.lproj/Localizable.strings b/Cable/es.lproj/Localizable.strings index fdfd823..7f6a994 100644 --- a/Cable/es.lproj/Localizable.strings +++ b/Cable/es.lproj/Localizable.strings @@ -293,6 +293,8 @@ "chargers.onboarding.subtitle" = "Lleva el control del cargador de costa, los boosters y los controladores solares para saber cuánta potencia de carga tienes."; "chargers.onboarding.primary" = "Crear cargador"; +"sample.battery.rv.name" = "Banco LiFePO4 de servicio"; +"sample.battery.workshop.name" = "Batería de respaldo del banco de trabajo"; "sample.charger.shore.name" = "Cargador de costa"; "sample.charger.dcdc.name" = "Cargador DC-DC"; "sample.charger.workbench.name" = "Cargador de banco de trabajo"; diff --git a/Cable/fr.lproj/Localizable.strings b/Cable/fr.lproj/Localizable.strings index 26f3b4e..4e77dde 100644 --- a/Cable/fr.lproj/Localizable.strings +++ b/Cable/fr.lproj/Localizable.strings @@ -293,6 +293,8 @@ "chargers.onboarding.subtitle" = "Suivez l'alimentation quai, les boosters et les régulateurs solaires pour connaître votre capacité de charge."; "chargers.onboarding.primary" = "Créer un chargeur"; +"sample.battery.rv.name" = "Batterie de service LiFePO4"; +"sample.battery.workshop.name" = "Batterie de secours de l'établi"; "sample.charger.shore.name" = "Chargeur de quai"; "sample.charger.dcdc.name" = "Chargeur DC-DC"; "sample.charger.workbench.name" = "Chargeur d'établi"; diff --git a/Cable/nl.lproj/Localizable.strings b/Cable/nl.lproj/Localizable.strings index 88a5e87..3a3f6cf 100644 --- a/Cable/nl.lproj/Localizable.strings +++ b/Cable/nl.lproj/Localizable.strings @@ -293,6 +293,8 @@ "chargers.onboarding.subtitle" = "Houd walstroom, boosters en zonne-regelaars bij om je laadcapaciteit te kennen."; "chargers.onboarding.primary" = "Lader aanmaken"; +"sample.battery.rv.name" = "LiFePO4-huishoudaccu"; +"sample.battery.workshop.name" = "Reserveaccu voor werkbank"; "sample.charger.shore.name" = "Walstroomlader"; "sample.charger.dcdc.name" = "DC-DC-lader"; "sample.charger.workbench.name" = "Werkplaatslader";