tokenary/Tokenary macOS/Screens/WelcomeViewController.swift
2021-12-02 21:51:45 +03:00

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
}
}