Meshtastic-Apple/Meshtastic/Views/Helpers/Help/ChannelsHelp.swift
Garth Vander Houwen 8f9be79c55
2.7.5 Working Changes (#1460)
* Remove extra want config call when adding a contact

* App badge and unnecessary notification fixes (#1455)

* - Fix for app badge not going to zero if a message arrives while you have that chat open
- Fix for push notifications popping up when a message is received while that chat is open

* Fix for cancelling notifications, works now. And scroll to bottom of conversation upon new message

* Fix: Channels help grammer fix (#1452)

* remove outdated TCP not available on Apple devices (#1450)

* Update initial onboarding view

* remove toggle gating for mac

* Update crash reporting opt out in real time

* Update onboarding text

---------

Co-authored-by: Gnome Adrift <646322+gnomeadrift@users.noreply.github.com>
Co-authored-by: Zain Kergaye <62440012+ZainKergaye@users.noreply.github.com>
Co-authored-by: NillRudd <102033730+NillRudd@users.noreply.github.com>
2025-10-10 14:07:36 -07:00

97 lines
3 KiB
Swift

//
// ChannelHelp.swift
// Meshtastic
//
// Copyright(c) Garth Vander Houwen 6/18/25.
//
import SwiftUI
struct ChannelsHelp: View {
private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom }
@Environment(\.dismiss) private var dismiss
var body: some View {
ScrollView {
Label("Channels Help", systemImage: "questionmark.circle")
.font(.title)
.padding(.vertical)
VStack(alignment: .leading) {
HStack {
CircleText(text: String(0), color: .accentColor)
.brightness(0.2)
.offset(y: -10)
Text("A channel index of 0 indicates the primary channel where broadcast packets are sent from. Location data is broadcast from the first channel where it is enabled with firmware 2.7 forward.")
.fixedSize(horizontal: false, vertical: true)
.padding(.bottom)
.padding(.leading, 7)
}
HStack {
Image(systemName: "lock.fill")
.padding(.leading)
.padding(.trailing, 7)
.foregroundColor(Color.green)
.font(.title)
Text("A green lock means the channel is securely encrypted with either a 128 or 256 bit AES key.")
.fixedSize(horizontal: false, vertical: true)
.padding(.bottom)
}
HStack {
Image(systemName: "lock.open.fill")
.padding(.leading)
.foregroundColor(Color.yellow)
.font(.title)
Text("A yellow open lock means the channel is not securely encrypted but it is not used for precise location data, it uses either no key at all or a 1 byte known key.")
.fixedSize(horizontal: false, vertical: true)
.padding(.bottom)
}
HStack {
Image(systemName: "lock.open.fill")
.padding(.leading)
.foregroundColor(Color.red)
.font(.title)
Text("A red open lock means the channel is not securely encrypted and is used for precise location data, it uses either no key at all or a 1 byte known key.")
.fixedSize(horizontal: false, vertical: true)
.padding(.bottom)
}
HStack {
Image(systemName: "lock.open.trianglebadge.exclamationmark.fill")
.padding(.leading)
.symbolRenderingMode(.multicolor)
.foregroundColor(Color.red)
.font(.title)
Text("A red open lock with a warning means the channel is not securely encrypted and is used for precise location data which is being uplinked to the internet via MQTT, it uses either no key at all or a 1 byte known key.")
.fixedSize(horizontal: false, vertical: true)
.padding(.bottom)
}
}
#if targetEnvironment(macCatalyst)
Spacer()
Button {
dismiss()
} label: {
Label("Close", systemImage: "xmark")
}
.buttonStyle(.bordered)
.buttonBorderShape(.capsule)
.controlSize(.large)
.padding(.bottom)
#endif
}
.frame(minHeight: 0, maxHeight: .infinity, alignment: .leading)
.padding()
.presentationDetents([.large])
.presentationContentInteraction(.scrolls)
.presentationDragIndicator(.visible)
.presentationBackgroundInteraction(.enabled(upThrough: .large))
}
}
struct ChannelHelpPreviews: PreviewProvider {
static var previews: some View {
VStack {
ChannelsHelp()
}
}
}