2024-08-15 16:31:58 -07:00
//
// L o c k L e g e n d . s w i f t
// M e s h t a s t i c
//
// C o p y r i g h t G a r t h V a n d e r H o u w e n 8 / 1 5 / 2 4 .
//
import SwiftUI
struct LockLegend : View {
var body : some View {
VStack ( alignment : . leading ) {
Text ( " What does the lock mean? " )
2024-08-15 20:20:59 -07:00
. font ( . title2 )
. padding ( . bottom , 5 )
2024-08-15 16:31:58 -07:00
VStack ( alignment : . leading ) {
HStack {
Image ( systemName : " lock.open.fill " )
. foregroundColor ( . yellow )
Text ( " Shared Key " )
. fontWeight ( . semibold )
}
2024-08-15 20:20:59 -07:00
Text ( " Direct messages are using the shared key for the channel. " )
. allowsTightening ( /* @ S T A R T _ M E N U _ T O K E N @ */ true /* @ E N D _ M E N U _ T O K E N @ */ )
. font ( . callout )
2024-08-15 16:31:58 -07:00
. fixedSize ( horizontal : false , vertical : true )
}
. padding ( . bottom )
VStack ( alignment : . leading ) {
HStack {
Image ( systemName : " lock.fill " )
. foregroundColor ( . green )
Text ( " Public Key Encryption " )
. fontWeight ( . semibold )
}
2024-08-21 08:55:48 -05:00
Text ( " Direct messages are using the new public key infrastructure for encryption. Requires firmware version 2.5 or greater. " )
2024-08-15 20:20:59 -07:00
. allowsTightening ( /* @ S T A R T _ M E N U _ T O K E N @ */ true /* @ E N D _ M E N U _ T O K E N @ */ )
. font ( . callout )
2024-08-15 16:31:58 -07:00
. fixedSize ( horizontal : false , vertical : true )
}
. padding ( . bottom )
VStack ( alignment : . leading ) {
HStack {
Image ( systemName : " key.slash " )
. foregroundColor ( . red )
Text ( " Public Key Mismatch " )
. fontWeight ( . semibold )
}
2024-08-15 20:20:59 -07:00
Text ( " The public key does not match the recorded key. You may delete the node and let it exchange keys again, but this may indicate a more serious security problem. Contact the user through another trusted channel, to determine if the key change was due to a factory reset or other intentional action. " )
. allowsTightening ( /* @ S T A R T _ M E N U _ T O K E N @ */ true /* @ E N D _ M E N U _ T O K E N @ */ )
. font ( . callout )
2024-08-15 16:31:58 -07:00
. fixedSize ( horizontal : false , vertical : true )
}
. padding ( . bottom )
}
}
}
struct LockLegendPreviews : PreviewProvider {
static var previews : some View {
VStack {
LockLegend ( )
}
}
}