mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
Merge pull request #120 from kkebo/119-remove-as-is-action
This commit is contained in:
commit
547b548525
3 changed files with 9 additions and 16 deletions
|
|
@ -1,14 +0,0 @@
|
|||
//
|
||||
// NEOnDemandRuleAction+CaseIterable.swift
|
||||
// DNSecure
|
||||
//
|
||||
// Created by Kenta Kubo on 12/20/20.
|
||||
//
|
||||
|
||||
import NetworkExtension
|
||||
|
||||
extension NEOnDemandRuleAction: @retroactive CaseIterable {
|
||||
public static var allCases: [Self] {
|
||||
[.connect, .disconnect, .evaluateConnection, .ignore]
|
||||
}
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ extension Configuration: CustomStringConvertible {
|
|||
struct OnDemandRule {
|
||||
var id = UUID()
|
||||
var name: String
|
||||
var action: NEOnDemandRuleAction = .ignore
|
||||
var action: NEOnDemandRuleAction = .connect
|
||||
var interfaceType: NEOnDemandRuleInterfaceType = .any
|
||||
var ssidMatch: [String] = []
|
||||
var dnsSearchDomainMatch: [String] = []
|
||||
|
|
|
|||
|
|
@ -56,7 +56,14 @@ extension RuleView: View {
|
|||
|
||||
Section {
|
||||
Picker("Action", selection: self.$rule.action) {
|
||||
ForEach(NEOnDemandRuleAction.allCases, id: \.self) {
|
||||
ForEach(
|
||||
[
|
||||
NEOnDemandRuleAction.connect,
|
||||
.evaluateConnection,
|
||||
.disconnect,
|
||||
],
|
||||
id: \.self
|
||||
) {
|
||||
Text($0.description)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue