Fix macOS toggle style

This commit is contained in:
世界
2024-09-16 14:22:36 +08:00
parent 66a33e3398
commit a8ea162606
6 changed files with 77 additions and 131 deletions
@@ -17,19 +17,12 @@ public struct OnDemandRulesView: View {
}
} else {
FormView {
FormSection {
Toggle("Always On", isOn: $alwaysOn)
.onChangeCompat(of: alwaysOn) { newValue in
Task {
await SharedPreferences.alwaysOn.set(newValue)
}
}
} footer: {
Text("""
Implement always-on via on-demand rules.
FormToggle("Always On", """
Implement always-on via on-demand rules.
This should not be an intended use of the API, so you cannot disable VPN in system settings. To stop the service manually, use the in-app interface or simply delete the VPN profile.
""")
This should not be an intended use of the API, so you cannot disable VPN in system settings. To stop the service manually, use the in-app interface or simply delete the VPN profile.
""", $alwaysOn) { newValue in
await SharedPreferences.alwaysOn.set(newValue)
}
FormButton {