mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-13 19:10:39 +00:00
26 lines
672 B
Swift
26 lines
672 B
Swift
import SwiftUI
|
|
|
|
extension View {
|
|
func gatewayActionsDialog(
|
|
isPresented: Binding<Bool>,
|
|
onDisconnect: @escaping () -> Void,
|
|
onOpenSettings: @escaping () -> Void) -> some View
|
|
{
|
|
self.confirmationDialog(
|
|
"Gateway",
|
|
isPresented: isPresented,
|
|
titleVisibility: .visible)
|
|
{
|
|
Button("Disconnect", role: .destructive) {
|
|
onDisconnect()
|
|
}
|
|
Button("Open Settings") {
|
|
onOpenSettings()
|
|
}
|
|
Button("Cancel", role: .cancel) {}
|
|
} message: {
|
|
Text("Disconnect from the gateway?")
|
|
}
|
|
}
|
|
}
|