Meshtastic-Apple/Meshtastic/Views/Bluetooth/InvalidVersion.swift

67 lines
1.6 KiB
Swift
Raw Normal View History

//
// InvalidVersion.swift
// Meshtastic
//
// Copyright(c) Garth Vander Houwen 7/13/22.
//
import SwiftUI
struct InvalidVersion: View {
2023-03-06 10:33:18 -08:00
@Environment(\.dismiss) private var dismiss
2023-03-06 10:33:18 -08:00
2022-09-27 06:40:10 -07:00
@State var minimumVersion = ""
@State var version = ""
var body: some View {
2023-03-06 10:33:18 -08:00
VStack {
2023-03-06 10:33:18 -08:00
2022-12-30 09:35:05 -08:00
Text("update.firmware")
.font(.largeTitle)
2022-09-27 06:40:10 -07:00
.foregroundColor(.orange)
2023-03-06 10:33:18 -08:00
2022-09-27 06:40:10 -07:00
Divider()
VStack {
2022-10-11 14:25:59 -07:00
Text("The Meshtastic Apple apps support firmware version \(minimumVersion) and above.")
2022-09-27 09:01:33 -07:00
.font(.title2)
.padding(.bottom)
2022-09-27 06:40:10 -07:00
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()
2022-10-11 14:25:59 -07:00
Divider()
.padding(.top)
2023-03-06 10:33:18 -08:00
VStack {
2022-10-11 14:25:59 -07:00
Text("🦕 End of life Version 🦖 ☄️")
.font(.title3)
.foregroundColor(.orange)
.padding(.bottom)
Text("Version \(minimumVersion) includes breaking changes to devices and the client apps. Only nodes version \(minimumVersion) and above are supported.")
.font(.callout)
.padding([.leading, .trailing, .bottom])
2022-10-11 14:25:59 -07:00
Link("Version 1.2 End of life (EOL) Info", destination: URL(string: "https://meshtastic.org/docs/1.2-End-of-life/")!)
.font(.callout)
2023-03-06 10:33:18 -08:00
#if targetEnvironment(macCatalyst)
Button {
dismiss()
} label: {
2022-12-29 16:36:43 -08:00
Label("close", systemImage: "xmark")
2023-03-06 10:33:18 -08:00
}
.buttonStyle(.bordered)
.buttonBorderShape(.capsule)
.controlSize(.large)
.padding()
#endif
2023-03-06 10:33:18 -08:00
2022-10-11 14:25:59 -07:00
}.padding()
}
}
}