style(macos): mark Reject destructive
parent
a31a569d52
commit
d96bc38bea
|
|
@ -307,6 +307,9 @@ enum BridgePairingApprover {
|
||||||
"""
|
"""
|
||||||
alert.addButton(withTitle: "Approve")
|
alert.addButton(withTitle: "Approve")
|
||||||
alert.addButton(withTitle: "Reject")
|
alert.addButton(withTitle: "Reject")
|
||||||
|
if #available(macOS 11.0, *), alert.buttons.indices.contains(1) {
|
||||||
|
alert.buttons[1].hasDestructiveAction = true
|
||||||
|
}
|
||||||
let resp = alert.runModal()
|
let resp = alert.runModal()
|
||||||
cont.resume(returning: resp == .alertFirstButtonReturn)
|
cont.resume(returning: resp == .alertFirstButtonReturn)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,9 @@ final class NodePairingApprovalPrompter {
|
||||||
alert.addButton(withTitle: "Approve")
|
alert.addButton(withTitle: "Approve")
|
||||||
alert.addButton(withTitle: "Reject")
|
alert.addButton(withTitle: "Reject")
|
||||||
alert.addButton(withTitle: "Later")
|
alert.addButton(withTitle: "Later")
|
||||||
|
if #available(macOS 11.0, *), alert.buttons.indices.contains(1) {
|
||||||
|
alert.buttons[1].hasDestructiveAction = true
|
||||||
|
}
|
||||||
|
|
||||||
let response = alert.runModal()
|
let response = alert.runModal()
|
||||||
Task { [weak self] in
|
Task { [weak self] in
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue