mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #498 from meshtastic/channelkey_editor
Use a segmented picker so you can see the disabled role
This commit is contained in:
commit
5134e1d65d
1 changed files with 12 additions and 8 deletions
|
|
@ -200,16 +200,20 @@ struct Channels: View {
|
|||
})
|
||||
.disabled(channelKeySize <= 0)
|
||||
}
|
||||
Picker("Channel Role", selection: $channelRole) {
|
||||
if channelRole == 1 {
|
||||
Text("Primary").tag(1)
|
||||
} else {
|
||||
Text("Disabled").tag(0)
|
||||
Text("Secondary").tag(2)
|
||||
HStack {
|
||||
Text("Role")
|
||||
Spacer()
|
||||
Picker("Channel Role", selection: $channelRole) {
|
||||
if channelRole == 1 {
|
||||
Text("Primary").tag(1)
|
||||
} else {
|
||||
Text("Disabled").tag(0)
|
||||
Text("Secondary").tag(2)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.disabled(channelRole == 1)
|
||||
}
|
||||
.pickerStyle(DefaultPickerStyle())
|
||||
.disabled(channelRole == 1)
|
||||
Toggle("Uplink Enabled", isOn: $uplink)
|
||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
Toggle("Downlink Enabled", isOn: $downlink)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue