diff --git a/DNSecure/Views/RuleView.swift b/DNSecure/Views/RuleView.swift index 65e8fb7..9c14818 100644 --- a/DNSecure/Views/RuleView.swift +++ b/DNSecure/Views/RuleView.swift @@ -19,6 +19,199 @@ extension RuleView: View { LazyTextField("Name", text: self.$rule.name) } + Section("Matching Conditions") { + NavigationLink { + Form { + Section { + Picker("Interface Type", selection: self.$rule.interfaceType) { + ForEach(NEOnDemandRuleInterfaceType.allCases, id: \.self) { + Text($0.description) + } + } + .pickerStyle(.inline) + .labelsHidden() + } footer: { + Text( + "If the current primary network interface is of this type and all of the other conditions in the rule match, then the rule matches." + ) + } + } + .navigationTitle("Interface Type Match") + } label: { + HStack { + Text("Interface Type Match") + Spacer() + Text(self.rule.interfaceType.description) + .foregroundStyle(.secondary) + } + } + + if self.rule.interfaceType.isSSIDUsed { + NavigationLink { + Form { + Section { + ForEach(0..