Merge pull request #120 from kkebo/119-remove-as-is-action

This commit is contained in:
Kenta Kubo 2025-09-03 02:34:27 +09:00 committed by GitHub
commit 547b548525
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 16 deletions

View file

@ -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]
}
}

View file

@ -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] = []

View file

@ -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)
}
}