Try and build for mac ventura

This commit is contained in:
Garth Vander Houwen 2022-10-13 16:33:33 -07:00
parent 9d4fa3b163
commit 9b89615856
2 changed files with 10 additions and 0 deletions

View file

@ -6,7 +6,9 @@
//
import SwiftUI
#if canImport(Charts)
import Charts
#endif
struct BatteryGauge: View {
@ -18,6 +20,7 @@ struct BatteryGauge: View {
var body: some View {
VStack {
#if !targetEnvironment(macCatalyst)
if batteryLevel == 0.0 {
// Plugged in
Image(systemName: "powerplug")
@ -47,6 +50,7 @@ struct BatteryGauge: View {
.tint(gradient)
.gaugeStyle(.accessoryCircular)
}
#endif
}
}
}

View file

@ -5,7 +5,9 @@
// Copyright(c) Garth Vander Houwen 7/7/22.
//
import SwiftUI
#if canImport(Charts)
import Charts
#endif
struct DeviceMetricsLog: View {
@ -35,6 +37,8 @@ struct DeviceMetricsLog: View {
if data.count > 0 {
#if canImport(Charts)
GroupBox(label: Label("Battery Level Trend", systemImage: "battery.100")) {
Chart(data.array as! [TelemetryEntity], id: \.self) {
@ -49,6 +53,8 @@ struct DeviceMetricsLog: View {
}
.frame(height: 150)
}
#endif
}
ScrollView {