style(macos): mark Reject destructive

This commit is contained in:
Peter Steinberger
2025-12-13 23:29:10 +00:00
parent a31a569d52
commit d96bc38bea
2 changed files with 6 additions and 0 deletions

View File

@@ -307,6 +307,9 @@ enum BridgePairingApprover {
"""
alert.addButton(withTitle: "Approve")
alert.addButton(withTitle: "Reject")
if #available(macOS 11.0, *), alert.buttons.indices.contains(1) {
alert.buttons[1].hasDestructiveAction = true
}
let resp = alert.runModal()
cont.resume(returning: resp == .alertFirstButtonReturn)
}

View File

@@ -80,6 +80,9 @@ final class NodePairingApprovalPrompter {
alert.addButton(withTitle: "Approve")
alert.addButton(withTitle: "Reject")
alert.addButton(withTitle: "Later")
if #available(macOS 11.0, *), alert.buttons.indices.contains(1) {
alert.buttons[1].hasDestructiveAction = true
}
let response = alert.runModal()
Task { [weak self] in