2021-06-23 22:15:56 +03:00
// C o p y r i g h t © 2 0 2 1 E n c r y p t e d I n k . A l l r i g h t s r e s e r v e d .
import Cocoa
class Alert : NSAlert {
override func runModal ( ) -> NSApplication . ModalResponse {
defer {
Agent . shared . statusBarButtonIsBlocked = false
}
Agent . shared . statusBarButtonIsBlocked = true
return super . runModal ( )
}
2021-07-17 19:05:59 +03:00
static func showWalletConnectInstructions ( ) {
2021-07-23 21:11:54 +03:00
Alert . showWithMessage ( " 1 — Open dapp website \n \n 2 — Click “Copy to clipboard” \n under WalletConnect QR code \n \n 3 — Open Encrypted Ink " , style : . informational )
}
static func showWithMessage ( _ message : String , style : NSAlert . Style ) {
2021-07-17 19:05:59 +03:00
let alert = Alert ( )
2021-07-23 21:11:54 +03:00
alert . messageText = message
alert . alertStyle = style
2021-07-17 19:05:59 +03:00
alert . addButton ( withTitle : " OK " )
_ = alert . runModal ( )
}
2021-06-23 22:15:56 +03:00
}