mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-22 08:32:11 +00:00
Provide default values for non-frozen enums (#1054)
This commit is contained in:
parent
9560acff3a
commit
537c5fd12c
@ -51,6 +51,9 @@ extension VPNSortField {
|
||||
|
||||
case .serverId:
|
||||
return NSSortDescriptor(key: "serverId", ascending: true)
|
||||
|
||||
@unknown default:
|
||||
return NSSortDescriptor()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,6 +84,9 @@ private extension DNSView {
|
||||
case .tls:
|
||||
ThemeTextField(Strings.Global.Nouns.hostname, text: draft.dotHostname, placeholder: Strings.Unlocalized.Placeholders.dotHostname)
|
||||
.labelsHidden()
|
||||
|
||||
@unknown default:
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,6 +112,9 @@ private extension OnDemandView {
|
||||
} else {
|
||||
suffix = Strings.Modules.OnDemand.Policy.Footer.excluding
|
||||
}
|
||||
|
||||
@unknown default:
|
||||
suffix = Strings.Modules.OnDemand.Policy.Footer.any
|
||||
}
|
||||
return Strings.Modules.OnDemand.Policy.footer(suffix)
|
||||
}
|
||||
|
@ -32,12 +32,12 @@ extension DNSProtocol: LocalizableEntity {
|
||||
switch self {
|
||||
case .cleartext:
|
||||
return Strings.Entities.DnsProtocol.cleartext
|
||||
|
||||
case .https:
|
||||
return Strings.Entities.DnsProtocol.https
|
||||
|
||||
case .tls:
|
||||
return Strings.Entities.DnsProtocol.tls
|
||||
@unknown default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,9 @@ extension OpenVPN.PullMask: LocalizableEntity {
|
||||
|
||||
case .proxy:
|
||||
return Strings.Unlocalized.proxy
|
||||
|
||||
@unknown default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,7 +69,7 @@ extension OpenVPN.CompressionFraming: LocalizableEntity {
|
||||
case .compress, .compressV2:
|
||||
return Strings.Unlocalized.OpenVPN.compress
|
||||
|
||||
default:
|
||||
@unknown default:
|
||||
return Strings.Global.Nouns.unknown
|
||||
}
|
||||
}
|
||||
@ -84,7 +87,7 @@ extension OpenVPN.CompressionAlgorithm: LocalizableEntity {
|
||||
case .other:
|
||||
return Strings.Entities.Openvpn.CompressionAlgorithm.other
|
||||
|
||||
default:
|
||||
@unknown default:
|
||||
return Strings.Global.Nouns.unknown
|
||||
}
|
||||
}
|
||||
@ -121,6 +124,9 @@ extension OpenVPN.XORMethod: StyledLocalizableEntity {
|
||||
|
||||
case .obfuscate:
|
||||
return V.obfuscate.rawValue
|
||||
|
||||
@unknown default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,9 +205,10 @@ private extension Optional where Wrapped == OpenVPN.TLSWrap {
|
||||
switch strategy {
|
||||
case .auth:
|
||||
return "--tls-auth"
|
||||
|
||||
case .crypt:
|
||||
return "--tls-crypt"
|
||||
@unknown default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,6 +168,9 @@ extension OnDemandModule.Policy: LocalizableEntity {
|
||||
|
||||
case .including:
|
||||
return Strings.Entities.OnDemand.Policy.including
|
||||
|
||||
@unknown default:
|
||||
return Strings.Entities.OnDemand.Policy.any
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -223,6 +226,9 @@ extension OpenVPN.Credentials.OTPMethod: StyledLocalizableEntity {
|
||||
|
||||
case .encode:
|
||||
return V.encode
|
||||
|
||||
@unknown default:
|
||||
return V.none
|
||||
}
|
||||
|
||||
case .approachDescription:
|
||||
@ -236,6 +242,9 @@ extension OpenVPN.Credentials.OTPMethod: StyledLocalizableEntity {
|
||||
|
||||
case .encode:
|
||||
return V.encode
|
||||
|
||||
@unknown default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user