system overview is cleaner now

This commit is contained in:
Stefan Lange-Hegermann
2025-10-29 10:22:54 +01:00
parent 10dc0e4fa9
commit 45a462295d
9 changed files with 48 additions and 28 deletions

View File

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

View File

@@ -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";

View File

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

View File

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

View File

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

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";