mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Add dismiss button to help sheet on share channels
This commit is contained in:
parent
c7a9883808
commit
b1166ef5ba
1 changed files with 13 additions and 5 deletions
|
|
@ -33,6 +33,7 @@ struct ShareChannels: View {
|
|||
|
||||
@Environment(\.managedObjectContext) var context
|
||||
@EnvironmentObject var bleManager: BLEManager
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
@State var channelSet: ChannelSet = ChannelSet()
|
||||
@State var includeChannel0 = true
|
||||
@State var includeChannel1 = true
|
||||
|
|
@ -48,8 +49,6 @@ struct ShareChannels: View {
|
|||
var qrCodeImage = QrCodeImage()
|
||||
|
||||
var body: some View {
|
||||
|
||||
// VStack {
|
||||
GeometryReader { bounds in
|
||||
let smallest = min(bounds.size.width, bounds.size.height)
|
||||
ScrollView {
|
||||
|
|
@ -218,8 +217,6 @@ struct ShareChannels: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
}
|
||||
.sheet(isPresented: $isPresentingHelp) {
|
||||
VStack {
|
||||
|
|
@ -244,6 +241,18 @@ struct ShareChannels: View {
|
|||
.padding()
|
||||
.presentationDetents([.large])
|
||||
.presentationDragIndicator(.automatic)
|
||||
|
||||
#if targetEnvironment(macCatalyst)
|
||||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Label("Close", systemImage: "xmark")
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
#endif
|
||||
}
|
||||
.navigationTitle("Generate QR Code")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
|
|
@ -263,7 +272,6 @@ struct ShareChannels: View {
|
|||
.onChange(of: includeChannel6) { includeCh6 in GenerateChannelSet() }
|
||||
.onChange(of: includeChannel7) { includeCh7 in GenerateChannelSet() }
|
||||
}
|
||||
// }
|
||||
}
|
||||
func GenerateChannelSet() {
|
||||
channelSet = ChannelSet()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue