Trust Ethernet on Mac
This commit is contained in:
parent
f5e01f9768
commit
7196aeab0d
|
@ -83,6 +83,16 @@ extension OnDemandView {
|
|||
Toggle(L10n.OnDemand.Items.Mobile.caption, isOn: $onDemand.withMobileNetwork)
|
||||
} header: {
|
||||
// TODO: on-demand, restore when "trusted networks" -> "on-demand"
|
||||
// Text(L10n.Profile.Sections.Trusted.header)
|
||||
}
|
||||
Section {
|
||||
SSIDList(withSSIDs: $onDemand.withSSIDs)
|
||||
}
|
||||
} else if Utils.hasEthernet() {
|
||||
Section {
|
||||
Toggle(L10n.OnDemand.Items.Ethernet.caption, isOn: $onDemand.withEthernetNetwork)
|
||||
} header: {
|
||||
// TODO: on-demand, restore when "trusted networks" -> "on-demand"
|
||||
// Text(L10n.Profile.Sections.Trusted.header)
|
||||
}
|
||||
Section {
|
||||
|
|
|
@ -51,6 +51,14 @@ extension Utils {
|
|||
return isFound
|
||||
}
|
||||
#endif
|
||||
|
||||
public static func hasEthernet() -> Bool {
|
||||
#if targetEnvironment(macCatalyst) || os(macOS)
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
}
|
||||
|
||||
public static func currentWifiSSID() async -> String? {
|
||||
#if targetEnvironment(simulator)
|
||||
|
|
Loading…
Reference in New Issue