mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-26 05:22:04 +03:00
28 lines
677 B
Swift
28 lines
677 B
Swift
// Copyright © 2021 Tokenary. All rights reserved.
|
|
|
|
import Cocoa
|
|
|
|
class ErrorViewController: NSViewController {
|
|
|
|
static func withMessage(_ message: String) -> ErrorViewController {
|
|
let new = instantiate(ErrorViewController.self)
|
|
new.message = message
|
|
return new
|
|
}
|
|
|
|
private var message = ""
|
|
|
|
@IBOutlet weak var titleLabel: NSTextField!
|
|
@IBOutlet weak var messageLabel: NSTextField!
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
messageLabel.stringValue = message
|
|
}
|
|
|
|
@IBAction func actionButtonTapped(_ sender: Any) {
|
|
Window.closeAllAndActivateBrowser(force: nil)
|
|
}
|
|
|
|
}
|