2021-11-30 15:56:00 +03:00
|
|
|
// Copyright © 2021 Tokenary. All rights reserved.
|
2021-06-17 20:45:27 +03:00
|
|
|
|
|
|
|
import Cocoa
|
|
|
|
|
|
|
|
class WelcomeViewController: NSViewController {
|
|
|
|
|
2021-06-19 00:38:05 +03:00
|
|
|
static func new(completion: ((Bool) -> Void)?) -> WelcomeViewController {
|
|
|
|
let new = instantiate(WelcomeViewController.self)
|
|
|
|
new.completion = completion
|
|
|
|
return new
|
|
|
|
}
|
|
|
|
|
2021-06-17 20:45:27 +03:00
|
|
|
@IBOutlet weak var titleLabel: NSTextField!
|
|
|
|
@IBOutlet weak var messageLabel: NSTextField!
|
|
|
|
|
2021-06-19 00:38:05 +03:00
|
|
|
private var completion: ((Bool) -> Void)?
|
|
|
|
|
2021-06-17 20:45:27 +03:00
|
|
|
override func viewDidLoad() {
|
|
|
|
super.viewDidLoad()
|
2021-08-31 21:44:38 +03:00
|
|
|
messageLabel.stringValue = Strings.welcomeScreenText
|
2021-06-17 20:45:27 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@IBAction func actionButtonTapped(_ sender: Any) {
|
2021-06-19 00:38:05 +03:00
|
|
|
let passwordViewController = PasswordViewController.with(mode: .create, completion: completion)
|
|
|
|
view.window?.contentViewController = passwordViewController
|
2021-06-17 20:45:27 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|