|
@@ -21,9 +21,8 @@ class AccountSetupController: UITableViewController {
|
|
lazy var configurationProgress: UICircularProgressRing = {
|
|
lazy var configurationProgress: UICircularProgressRing = {
|
|
let progress = UICircularProgressRing()
|
|
let progress = UICircularProgressRing()
|
|
progress.style = UICircularRingStyle.inside
|
|
progress.style = UICircularRingStyle.inside
|
|
- //progress.backgroundColor = UIColor.white.withAlphaComponent(0)
|
|
|
|
|
|
+ progress.outerRingColor = UIColor.clear
|
|
progress.maxValue = 100
|
|
progress.maxValue = 100
|
|
- progress.outerRingColor = UIColor.init(white: 1, alpha: 0)
|
|
|
|
progress.innerRingColor = DCColors.primary
|
|
progress.innerRingColor = DCColors.primary
|
|
progress.innerRingWidth = 2
|
|
progress.innerRingWidth = 2
|
|
progress.startAngle = 270
|
|
progress.startAngle = 270
|
|
@@ -32,7 +31,6 @@ class AccountSetupController: UITableViewController {
|
|
return progress
|
|
return progress
|
|
}()
|
|
}()
|
|
|
|
|
|
-
|
|
|
|
lazy var loginProgressHud: UIAlertController = {
|
|
lazy var loginProgressHud: UIAlertController = {
|
|
let alert = UIAlertController(title: "Configuring Account", message: "\n\n\n", preferredStyle: .alert)
|
|
let alert = UIAlertController(title: "Configuring Account", message: "\n\n\n", preferredStyle: .alert)
|
|
// temp workaround: add 3 newlines to let alertbox grow to fit progress indicator
|
|
// temp workaround: add 3 newlines to let alertbox grow to fit progress indicator
|
|
@@ -41,20 +39,12 @@ class AccountSetupController: UITableViewController {
|
|
alert.view.addSubview(progressView)
|
|
alert.view.addSubview(progressView)
|
|
progressView.centerXAnchor.constraint(equalTo: alert.view.centerXAnchor).isActive = true
|
|
progressView.centerXAnchor.constraint(equalTo: alert.view.centerXAnchor).isActive = true
|
|
progressView.centerYAnchor.constraint(equalTo: alert.view.centerYAnchor, constant: 0).isActive = true
|
|
progressView.centerYAnchor.constraint(equalTo: alert.view.centerYAnchor, constant: 0).isActive = true
|
|
- progressView.heightAnchor.constraint(equalToConstant: 70).isActive = true
|
|
|
|
- progressView.widthAnchor.constraint(equalToConstant: 70).isActive = true
|
|
|
|
- alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
|
|
|
|
|
|
+ progressView.heightAnchor.constraint(equalToConstant: 65).isActive = true
|
|
|
|
+ progressView.widthAnchor.constraint(equalToConstant: 65).isActive = true
|
|
|
|
+ alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: loginCancelled(_:)))
|
|
return alert
|
|
return alert
|
|
}()
|
|
}()
|
|
|
|
|
|
-/*
|
|
|
|
- private lazy var hudHandler: HudHandler = {
|
|
|
|
- let hudHandler = HudHandler(parentView: self)
|
|
|
|
- return hudHandler
|
|
|
|
- }()
|
|
|
|
-*/
|
|
|
|
-
|
|
|
|
-
|
|
|
|
private lazy var emailCell: TextFieldCell = {
|
|
private lazy var emailCell: TextFieldCell = {
|
|
let cell = TextFieldCell.makeEmailCell(delegate: self)
|
|
let cell = TextFieldCell.makeEmailCell(delegate: self)
|
|
cell.textField.tag = 0
|
|
cell.textField.tag = 0
|
|
@@ -435,10 +425,8 @@ class AccountSetupController: UITableViewController {
|
|
// self.hudHandler.setHudError(ui["errorMessage"] as? String)
|
|
// self.hudHandler.setHudError(ui["errorMessage"] as? String)
|
|
} else if ui["done"] as! Bool {
|
|
} else if ui["done"] as! Bool {
|
|
self.updateProgressHudSuccess(callback: self.handleLoginSuccess)
|
|
self.updateProgressHudSuccess(callback: self.handleLoginSuccess)
|
|
- // self.hudHandler.setHudDone(callback: self.handleLoginSuccess)
|
|
|
|
} else {
|
|
} else {
|
|
self.updateProgressHudValue(value: ui["progress"] as! Int)
|
|
self.updateProgressHudValue(value: ui["progress"] as! Int)
|
|
- // self.hudHandler.setHudProgress(ui["progress"] as! Int)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -597,15 +585,6 @@ class AdvancedSectionHeader: UIView {
|
|
return label
|
|
return label
|
|
}()
|
|
}()
|
|
|
|
|
|
- //
|
|
|
|
- // private var toggleButton:UIButton = {
|
|
|
|
- // let button = UIButton(type: .system)
|
|
|
|
- // button.setTitle("Show", for: .normal)
|
|
|
|
- // button.addTarget(self, action: #selector(buttonTapped(_:)), for: .touchUpInside )
|
|
|
|
- // //button.target(forAction: #selector(buttonTapped(_:)), withSender: self)
|
|
|
|
- // return button
|
|
|
|
- // }()
|
|
|
|
-
|
|
|
|
init() {
|
|
init() {
|
|
super.init(frame: .zero) // will be constraint from tableViewDelegate
|
|
super.init(frame: .zero) // will be constraint from tableViewDelegate
|
|
setupSubviews()
|
|
setupSubviews()
|
|
@@ -666,6 +645,10 @@ extension AccountSetupController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ func loginCancelled(_ action: UIAlertAction) {
|
|
|
|
+ print("Login cancelled")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|