tokenary/Encrypted Ink/Screens/ErrorViewController.swift
2021-06-19 21:20:43 +03:00

28 lines
672 B
Swift

// Copyright © 2021 Encrypted Ink. 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()
}
}