revert: As is

This commit is contained in:
Kenta Kubo 2025-09-03 02:28:26 +09:00
parent 06c5a5fc65
commit 3591b9840a
No known key found for this signature in database
GPG key ID: 3D79E20285C94BE8
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)
}
}