diff --git a/Simplenote/AuthViewController+Swift.swift b/Simplenote/AuthViewController+Swift.swift index f75ca3f38..00d46c05c 100644 --- a/Simplenote/AuthViewController+Swift.swift +++ b/Simplenote/AuthViewController+Swift.swift @@ -20,16 +20,23 @@ extension AuthViewController { // Secondary Action secondaryActionButton.contentTintColor = .simplenoteBrandColor - // Toggle Signup: Tip - switchTipField.textColor = .simplenoteTertiaryTextColor - - // Toggle Signup: Action - switchActionButton.contentTintColor = .simplenoteBrandColor - // WordPress SSO - wordPressSSOButton.image = NSImage(named: .wordPressLogo)?.tinted(with: .simplenoteBrandColor) wordPressSSOButton.title = Localization.dotcomSSOAction - wordPressSSOButton.contentTintColor = .simplenoteTertiaryTextColor + wordPressSSOButton.contentTintColor = .white + wordPressSSOContainerView.wantsLayer = true + wordPressSSOContainerView.layer?.backgroundColor = NSColor.simplenoteWPBlue50Color.cgColor + wordPressSSOContainerView.layer?.cornerRadius = 5 + + setupActionsSeparatorView() + } + + private func setupActionsSeparatorView() { + leadingSeparatorView.wantsLayer = true + leadingSeparatorView.layer?.backgroundColor = NSColor.lightGray.cgColor + trailingSeparatorView.wantsLayer = true + trailingSeparatorView.layer?.backgroundColor = NSColor.lightGray.cgColor + + separatorLabel.textColor = .lightGray } } @@ -67,8 +74,6 @@ extension AuthViewController { func refreshButtonTitles() { actionButton.title = mode.primaryActionText secondaryActionButton.title = mode.secondaryActionText?.uppercased() ?? "" - switchTipField.stringValue = mode.switchActionTip.uppercased() - switchActionButton.title = mode.switchActionText.uppercased() } /// Makes sure unused components (in the current mode) are effectively disabled @@ -102,7 +107,7 @@ extension AuthViewController { secondaryActionButton.alphaValue = mode.secondaryActionFieldAlpha wordPressSSOButton.alphaValue = mode.wordPressSSOFieldAlpha - switchAuthenticationView.isHidden = !mode.isSwitchVisible + actionsSeparatorView.isHidden = !mode.showActionSeparator } /// Animates Visible / Invisible components, based on the specified state @@ -167,11 +172,6 @@ extension AuthViewController { performSelector(onMainThread: secondaryActionSelector, with: nil, waitUntilDone: false) } - @IBAction - func switchAuthenticationMode(_ sender: Any) { - containingNavigationController?.push(nextViewController()) - } - private func nextViewController() -> AuthViewController { let nextMode = mode.nextMode() @@ -181,6 +181,11 @@ extension AuthViewController { return nextVC } + + @objc + func pushEmailLoginView() { + containingNavigationController?.push(nextViewController()) + } } diff --git a/Simplenote/AuthViewController.h b/Simplenote/AuthViewController.h index 5d85ff413..6bb688721 100644 --- a/Simplenote/AuthViewController.h +++ b/Simplenote/AuthViewController.h @@ -17,11 +17,12 @@ @property (nonatomic, strong) IBOutlet NSButton *actionButton; @property (nonatomic, strong) IBOutlet NSProgressIndicator *actionProgress; @property (nonatomic, strong) IBOutlet NSButton *secondaryActionButton; -@property (nonatomic, strong) IBOutlet NSTextField *switchTipField; -@property (nonatomic, strong) IBOutlet NSButton *switchActionButton; @property (nonatomic, strong) IBOutlet NSView *wordPressSSOContainerView; @property (nonatomic, strong) IBOutlet NSButton *wordPressSSOButton; -@property (weak) IBOutlet NSView *switchAuthenticationView; +@property (weak) IBOutlet NSView *actionsSeparatorView; +@property (weak) IBOutlet NSView *leadingSeparatorView; +@property (weak) IBOutlet NSTextField *separatorLabel; +@property (weak) IBOutlet NSView *trailingSeparatorView; @property (nonatomic, strong) IBOutlet NSLayoutConstraint *passwordFieldHeightConstraint; @property (nonatomic, strong) IBOutlet NSLayoutConstraint *secondaryActionHeightConstraint; diff --git a/Simplenote/AuthViewController.m b/Simplenote/AuthViewController.m index f8fde38bd..acbc1eeed 100644 --- a/Simplenote/AuthViewController.m +++ b/Simplenote/AuthViewController.m @@ -81,7 +81,6 @@ - (void)setInterfaceEnabled:(BOOL)enabled { [self.passwordField setEnabled:enabled]; [self.actionButton setEnabled:enabled]; [self.secondaryActionButton setEnabled:enabled]; - [self.switchActionButton setEnabled:enabled]; [self.wordPressSSOButton setEnabled:enabled]; } diff --git a/Simplenote/AuthViewController.xib b/Simplenote/AuthViewController.xib index d77d84527..6493dcb7f 100644 --- a/Simplenote/AuthViewController.xib +++ b/Simplenote/AuthViewController.xib @@ -10,16 +10,17 @@ + + + - - - + @@ -30,13 +31,13 @@ - + - + - + @@ -44,7 +45,7 @@ - + @@ -55,13 +56,13 @@ - + - + @@ -70,7 +71,7 @@ - + - - + + - - + + - - + - - + + + + + - + - - - - - - - + + + + + + + + + - +