blob: c83a339c82f62224dede4639b7896c12dd62ce51 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// SPDX-License-Identifier: MIT
// Copyright © 2018 WireGuard LLC. All Rights Reserved.
import Cocoa
class ErrorPresenter: ErrorPresenterProtocol {
static func showErrorAlert(title: String, message: String, from sourceVC: AnyObject?, onPresented: (() -> Void)?, onDismissal: (() -> Void)?) {
let alert = NSAlert()
alert.messageText = title
alert.informativeText = message
onPresented?()
alert.runModal()
onDismissal?()
}
}
|