tokenary/Encrypted Ink/Screens/WelcomeViewController.swift

29 lines
891 B
Swift
Raw Normal View History

2021-06-17 20:45:27 +03:00
// Copyright © 2021 Encrypted Ink. All rights reserved.
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()
messageLabel.stringValue = "Sign crypto transactions.\n\nIn any browser.\n\nOn any website."
}
@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
}
}