Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WordPressAuthenticator.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "WordPressAuthenticator"
s.version = "1.10.4"
s.version = "1.10.5-beta.1"
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."

s.description = <<-DESC
Expand Down
7 changes: 7 additions & 0 deletions WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ extension WPStyleGuide {
onePasswordButton.addTarget(target, action: selector, for: .touchUpInside)
}

/// Configures a plain text button with default styles.
///
class func configureTextButton(_ button: UIButton) {
button.setTitleColor(WordPressAuthenticator.shared.style.textButtonColor, for: .normal)
button.setTitleColor(WordPressAuthenticator.shared.style.textButtonHighlightColor, for: .highlighted)
}

///
///
class func colorForErrorView(_ opaque: Bool) -> UIColor {
Expand Down
1 change: 1 addition & 0 deletions WordPressAuthenticator/Signin/Login2FAViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class Login2FAViewController: LoginViewController, NUXKeyboardResponder, UITextF
private func styleSendCodeButton() {
sendCodeButton.titleLabel?.adjustsFontForContentSizeCategory = true
sendCodeButton.titleLabel?.adjustsFontSizeToFitWidth = true
WPStyleGuide.configureTextButton(sendCodeButton)
}

// MARK: Configuration Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ open class LoginEmailViewController: LoginViewController, NUXKeyboardResponder {
loginFields.meta.userIsDotCom = true

configureEmailField()
configureAlternativeLabel()
configureSubmitButton()
configureViewForEditingIfNeeded()
configureForWPComOnlyIfNeeded()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class LoginLinkRequestViewController: LoginViewController {
super.viewDidLoad()

localizeControls()
configureUsePasswordButton()

let email = loginFields.username
if !email.isValidEmail() {
Expand Down Expand Up @@ -78,6 +79,13 @@ class LoginLinkRequestViewController: LoginViewController {
sendLinkButton?.isEnabled = !animating
}

private func configureUsePasswordButton() {
guard let usePasswordButton = usePasswordButton else {
return
}
WPStyleGuide.configureTextButton(usePasswordButton)
}


// MARK: - Instance Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class LoginSelfHostedViewController: LoginViewController, NUXKeyboardResponder {
///
@objc func configureForgotPasswordButton() {
forgotPasswordButton.isEnabled = enableSubmit(animating: false)
WPStyleGuide.configureTextButton(forgotPasswordButton)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class LoginSiteAddressViewController: LoginViewController, NUXKeyboardResponder
loginFields.meta.userIsDotCom = false

configureTextFields()
configureSiteAddressHelpButton()
configureSubmitButton(animating: false)
configureViewForEditingIfNeeded()

Expand Down Expand Up @@ -132,6 +133,10 @@ class LoginSiteAddressViewController: LoginViewController, NUXKeyboardResponder
}
}

private func configureSiteAddressHelpButton() {
WPStyleGuide.configureTextButton(siteAddressHelpButton)
}


// MARK: - Instance Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class LoginUsernamePasswordViewController: LoginViewController, NUXKeyboardRespo
///
@objc func configureForgotPasswordButton() {
forgotPasswordButton.isEnabled = enableSubmit(animating: false)
WPStyleGuide.configureTextButton(forgotPasswordButton)
}


Expand Down
8 changes: 8 additions & 0 deletions WordPressAuthenticator/Signin/LoginWPComViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class LoginWPComViewController: LoginViewController, NUXKeyboardResponder {

configureTextFields()
configureEmailIcon()
configureForgotPasswordButton()
configureSubmitButton(animating: false)
configureViewForEditingIfNeeded()
}
Expand Down Expand Up @@ -128,6 +129,13 @@ class LoginWPComViewController: LoginViewController, NUXKeyboardResponder {
emailIcon?.image = image.imageWithTintColor(WordPressAuthenticator.shared.style.subheadlineColor)
}

private func configureForgotPasswordButton() {
guard let forgotPasswordButton = forgotPasswordButton else {
return
}
WPStyleGuide.configureTextButton(forgotPasswordButton)
}

@objc func localizeControls() {

instructionLabel?.text = {
Expand Down