Meshtastic-Apple/Meshtastic/Views/Bluetooth/InvalidVersion.swift
Garth Vander Houwen f259cb15fd Dismiss buttons for sheets on mac
Add icon to clear app data button
Convert settings view to navigationsplitview
2022-11-08 23:18:50 -08:00

81 lines
1.9 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 breaking changes to devices and the client apps. Only nodes version \(minimumVersion) and above are supported.")
.font(.callout)
.padding([.leading, .trailing, .bottom])
Text("There is a build for 1.2 EOL under Other Versions in TestFlight that will be available until the end of November 2022.")
.font(.callout)
.padding([.leading, .trailing, .bottom])
Link("Version 1.2 End of life (EOL) Info", destination: URL(string: "https://meshtastic.org/docs/1.2-End-of-life/")!)
.font(.callout)
#if targetEnvironment(macCatalyst)
Button {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
}
.buttonStyle(.bordered)
.buttonBorderShape(.capsule)
.controlSize(.large)
.padding()
#endif
}.padding()
}
}
}