diff options
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ErrorPresenter.swift | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ErrorPresenter.swift b/WireGuard/WireGuard/UI/macOS/ErrorPresenter.swift new file mode 100644 index 0000000..c83a339 --- /dev/null +++ b/WireGuard/WireGuard/UI/macOS/ErrorPresenter.swift @@ -0,0 +1,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?() + } +} |