mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-26 15:39:34 +00:00
fix ios quick setup suppression toggle
This commit is contained in:
@@ -95,7 +95,7 @@ struct GatewayQuickSetupSheet: View {
|
||||
.buttonStyle(.bordered)
|
||||
.disabled(self.connecting)
|
||||
|
||||
Toggle("Don’t show this again", isOn: self.$quickSetupDismissed)
|
||||
self.fullRowToggle("Don’t show this again", isOn: self.$quickSetupDismissed)
|
||||
.padding(.top, 4)
|
||||
} else {
|
||||
Text("No gateways found yet. Make sure your gateway is running and Bonjour discovery is enabled.")
|
||||
@@ -135,6 +135,23 @@ struct GatewayQuickSetupSheet: View {
|
||||
self.gatewayController.gateways.first
|
||||
}
|
||||
|
||||
private func fullRowToggle(_ title: String, isOn: Binding<Bool>) -> some View {
|
||||
Toggle(title, isOn: isOn)
|
||||
.contentShape(Rectangle())
|
||||
.overlay {
|
||||
// Keep Toggle semantics for accessibility while making the full visual row tappable.
|
||||
Button {
|
||||
isOn.wrappedValue.toggle()
|
||||
} label: {
|
||||
Rectangle()
|
||||
.fill(.clear)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
private func gatewayProblemPrimaryActionTitle(_ problem: GatewayConnectionProblem) -> String {
|
||||
problem.canTrustRotatedCertificate ? "Trust certificate" : "Connect"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user