mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-14 14:40:20 +03:00
29 lines
846 B
Swift
29 lines
846 B
Swift
// Copyright © 2021 Tokenary. All rights reserved.
|
|
|
|
import Cocoa
|
|
|
|
class WelcomeViewController: NSViewController {
|
|
|
|
static func new(completion: ((Bool) -> Void)?) -> WelcomeViewController {
|
|
let new = instantiate(WelcomeViewController.self)
|
|
new.completion = completion
|
|
return new
|
|
}
|
|
|
|
@IBOutlet weak var titleLabel: NSTextField!
|
|
@IBOutlet weak var messageLabel: NSTextField!
|
|
|
|
private var completion: ((Bool) -> Void)?
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
messageLabel.stringValue = Strings.welcomeScreenText
|
|
}
|
|
|
|
@IBAction func actionButtonTapped(_ sender: Any) {
|
|
let passwordViewController = PasswordViewController.with(mode: .create, completion: completion)
|
|
view.window?.contentViewController = passwordViewController
|
|
}
|
|
|
|
}
|