2022-07-13 08:32:34 -07:00
//
// I n v a l i d V e r s i o n . s w i f t
// M e s h t a s t i c
//
// C o p y r i g h t ( c ) G a r t h V a n d e r H o u w e n 7 / 1 3 / 2 2 .
//
import SwiftUI
struct InvalidVersion : View {
2023-03-06 10:33:18 -08:00
2022-11-08 23:18:50 -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 = " "
2022-07-13 08:32:34 -07:00
var body : some View {
2023-03-06 10:33:18 -08:00
2022-07-13 08:32:34 -07:00
VStack {
2023-03-06 10:33:18 -08:00
2022-12-30 09:35:05 -08:00
Text ( " update.firmware " )
2022-07-13 08:32:34 -07:00
. 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. " )
2022-11-08 22:01:32 -08:00
. 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
2022-11-08 22:01:32 -08:00
#if targetEnvironment ( macCatalyst )
Button {
2022-11-08 23:18:50 -08:00
dismiss ( )
2022-11-08 22:01:32 -08:00
} label : {
2022-12-29 16:36:43 -08:00
Label ( " close " , systemImage : " xmark " )
2023-03-06 10:33:18 -08:00
2022-11-08 22:01:32 -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 ( )
2022-07-13 08:32:34 -07:00
}
}
}