mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Try and build for mac ventura
This commit is contained in:
parent
9d4fa3b163
commit
9b89615856
2 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue