The Standby Power card was part of the charging monitoring interface and belongs in the Charge Record tab, not in the Live Data view. This removes the orphaned NavigationLink and standbyWizardCard property from MeterLiveContentView that were left behind during refactoring. ChargerStandbyPowerWizardView remains in use by ChargeRecord and ChargedDeviceDetailView views where it's appropriately placed.
@@ -36,15 +36,6 @@ struct MeterLiveContentView: View {
|
||
| 36 | 36 |
} |
| 37 | 37 |
.frame(maxWidth: .infinity, alignment: .leading) |
| 38 | 38 |
|
| 39 |
- NavigationLink( |
|
| 40 |
- destination: ChargerStandbyPowerWizardView( |
|
| 41 |
- preferredMeterMACAddress: meter.btSerial.macAddress.description |
|
| 42 |
- ) |
|
| 43 |
- ) {
|
|
| 44 |
- standbyWizardCard |
|
| 45 |
- } |
|
| 46 |
- .buttonStyle(.plain) |
|
| 47 |
- |
|
| 48 | 39 |
LazyVGrid(columns: liveMetricColumns, spacing: compactLayout ? 10 : 12) {
|
| 49 | 40 |
if shouldShowVoltageCard {
|
| 50 | 41 |
liveMetricCard( |
@@ -229,34 +220,6 @@ struct MeterLiveContentView: View {
|
||
| 229 | 220 |
) |
| 230 | 221 |
} |
| 231 | 222 |
|
| 232 |
- private var standbyWizardCard: some View {
|
|
| 233 |
- MeterInfoCardView(title: "Standby Power", tint: .orange) {
|
|
| 234 |
- Label("New Measurement", systemImage: "plus.circle.fill")
|
|
| 235 |
- .font(.subheadline.weight(.semibold)) |
|
| 236 |
- .foregroundColor(.orange) |
|
| 237 |
- |
|
| 238 |
- if let session = appData.chargerStandbyMeasurementSession(for: meter.btSerial.macAddress.description) {
|
|
| 239 |
- Text( |
|
| 240 |
- "Active on \(appData.chargedDeviceSummary(id: session.chargerID)?.name ?? "selected charger") • \(session.readinessDescription)" |
|
| 241 |
- ) |
|
| 242 |
- .font(.caption) |
|
| 243 |
- .foregroundColor(.secondary) |
|
| 244 |
- } else if let charger = appData.currentChargerSummary(for: meter.btSerial.macAddress.description) {
|
|
| 245 |
- Text( |
|
| 246 |
- charger.latestStandbyPowerMeasurement.map {
|
|
| 247 |
- "\(charger.name) • latest \($0.averagePowerWatts.format(decimalDigits: 3)) W" |
|
| 248 |
- } ?? "\(charger.name) • no saved standby baseline" |
|
| 249 |
- ) |
|
| 250 |
- .font(.caption) |
|
| 251 |
- .foregroundColor(.secondary) |
|
| 252 |
- } else {
|
|
| 253 |
- Text("Open the wizard and choose the charger there.")
|
|
| 254 |
- .font(.caption) |
|
| 255 |
- .foregroundColor(.secondary) |
|
| 256 |
- .frame(maxWidth: .infinity, alignment: .leading) |
|
| 257 |
- } |
|
| 258 |
- } |
|
| 259 |
- } |
|
| 260 | 223 |
|
| 261 | 224 |
private var showsCompactMetricRange: Bool {
|
| 262 | 225 |
compactLayout && (availableSize?.height ?? 0) >= 380 |