mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
* Add SwiftUI previews for simple helper views Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/a2a43e8c-24fd-443a-8a98-13b678770edd Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com> * Add previews for action buttons, ChannelForm, MetricsColumnDetail, and DeviceOnboarding Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/a2a43e8c-24fd-443a-8a98-13b678770edd Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com> * Add previews for config views, log views, AppLog, Firmware, AppData, and UserConfig Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/a2a43e8c-24fd-443a-8a98-13b678770edd Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com> * Add preview for PositionConfig Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/a2a43e8c-24fd-443a-8a98-13b678770edd Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com> * Fix formatting bugs in #Preview blocks: restore missing .environmentObject/.environment modifiers and add proper tab indentation Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/7eeb7a54-7928-466f-8e39-b00d0012a09d Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com> * Linting fixes --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com> Co-authored-by: Garth Vander Houwen <garthvh@yahoo.com>
68 lines
1.6 KiB
Swift
68 lines
1.6 KiB
Swift
//
|
|
// InvalidVersion.swift
|
|
// Meshtastic
|
|
//
|
|
// Copyright(c) Garth Vander Houwen 7/13/22.
|
|
//
|
|
import SwiftUI
|
|
|
|
struct InvalidVersion: View {
|
|
|
|
@Environment(\.dismiss) private var dismiss
|
|
|
|
@State var minimumVersion = ""
|
|
@State var version = ""
|
|
|
|
var body: some View {
|
|
|
|
VStack {
|
|
|
|
Text("Update Your Firmware")
|
|
.font(.largeTitle)
|
|
.foregroundColor(.orange)
|
|
|
|
Divider()
|
|
VStack {
|
|
Text("The Meshtastic Apple apps support firmware version \(minimumVersion) and above.")
|
|
.font(.title2)
|
|
.padding(.bottom)
|
|
Link("Firmware update docs", destination: URL(string: "https://meshtastic.org/docs/getting-started/flashing-firmware/")!)
|
|
.font(.title)
|
|
.padding()
|
|
Link("Additional help", destination: URL(string: "https://meshtastic.org/docs/faq")!)
|
|
.font(.title)
|
|
.padding()
|
|
}
|
|
.padding()
|
|
Divider()
|
|
.padding(.top)
|
|
VStack {
|
|
Text("🦕 End of life Version 🦖 ☄️")
|
|
.font(.title3)
|
|
.foregroundColor(.orange)
|
|
.padding(.bottom)
|
|
Text("Version \(minimumVersion) includes substantial network optimizations and extensive changes to devices and client apps. Only nodes version \(minimumVersion) and above are supported.")
|
|
.font(.callout)
|
|
.padding([.leading, .trailing, .bottom])
|
|
|
|
#if targetEnvironment(macCatalyst)
|
|
Button {
|
|
dismiss()
|
|
} label: {
|
|
Label("Close", systemImage: "xmark")
|
|
|
|
}
|
|
.buttonStyle(.bordered)
|
|
.buttonBorderShape(.capsule)
|
|
.controlSize(.large)
|
|
.padding()
|
|
#endif
|
|
|
|
}.padding()
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
InvalidVersion(minimumVersion: "2.5.4", version: "2.3.0")
|
|
}
|