Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 49ad985

Browse files
authored
Merge pull request #242 from wordpress-mobile/issue/241-remove-showSelfHostedLogin
UL&S: Remove .showSelfHostedLogin
2 parents 541ce42 + 7cf66f0 commit 49ad985

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressAuthenticator"
3-
s.version = "1.13.0-beta.3"
3+
s.version = "1.13.0-beta.4"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC

WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ import AuthenticationServices
198198
/// Returns an instance of LoginSiteAddressViewController: allows the user to log into a WordPress.org website.
199199
///
200200
@objc public class func signinForWPOrg() -> UIViewController {
201-
let storyboard = UIStoryboard(name: "Login", bundle: bundle)
202-
guard let controller = storyboard.instantiateViewController(withIdentifier: "siteAddress") as? LoginSiteAddressViewController else {
201+
guard let controller = LoginSiteAddressViewController.instantiate(from: .login) else {
203202
fatalError("unable to create wpcom password screen")
204203
}
205204

WordPressAuthenticator/NUX/NUXViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ open class NUXViewController: UIViewController, NUXViewControllerBase, UIViewCon
2626
/// Segue identifiers to avoid using strings
2727
public enum SegueIdentifier: String {
2828
case showWPUsernamePassword
29-
case showSelfHostedLogin
3029
case showWPComLogin
3130
case startMagicLinkFlow
3231
case showMagicLink

WordPressAuthenticator/Signin/Login.storyboard

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@
109109
<navigationItem key="navigationItem" id="42E-2e-kOq"/>
110110
<connections>
111111
<segue destination="hed-vB-osh" kind="presentation" identifier="showLoginMethod" id="N3P-wt-Rn3"/>
112-
<segue destination="anK-hg-K4j" kind="show" identifier="showSelfHostedLogin" id="Njv-lY-Lyi"/>
113112
<segue destination="lmD-c6-SLs" kind="show" identifier="showWPComLogin" id="UV4-XI-c0q"/>
114113
</connections>
115114
</viewController>
@@ -349,7 +348,6 @@
349348
<outlet property="submitButton" destination="OZC-xf-OAn" id="k1c-SJ-qiK"/>
350349
<segue destination="Kvo-Y2-yhG" kind="show" identifier="startMagicLinkFlow" id="db9-5R-Qq7"/>
351350
<segue destination="lmD-c6-SLs" kind="show" identifier="showWPComLogin" id="ySQ-EM-6JI"/>
352-
<segue destination="anK-hg-K4j" kind="show" identifier="showSelfHostedLogin" id="bK1-J1-hfT"/>
353351
<segue destination="klu-4U-PyL" kind="show" identifier="showSignupEmail" id="dh4-9P-l8W"/>
354352
</connections>
355353
</viewController>
@@ -1002,7 +1000,7 @@
10021000
<!--Login Site Address View Controller-->
10031001
<scene sceneID="idG-jg-gxH">
10041002
<objects>
1005-
<viewController storyboardIdentifier="siteAddress" extendedLayoutIncludesOpaqueBars="YES" useStoryboardIdentifierAsRestorationIdentifier="YES" id="anK-hg-K4j" customClass="LoginSiteAddressViewController" customModule="WordPressAuthenticator" sceneMemberID="viewController">
1003+
<viewController storyboardIdentifier="LoginSiteAddressViewController" extendedLayoutIncludesOpaqueBars="YES" useStoryboardIdentifierAsRestorationIdentifier="YES" id="anK-hg-K4j" customClass="LoginSiteAddressViewController" customModule="WordPressAuthenticator" sceneMemberID="viewController">
10061004
<layoutGuides>
10071005
<viewControllerLayoutGuide type="top" id="pmp-Uj-4NW"/>
10081006
<viewControllerLayoutGuide type="bottom" id="rYV-q2-blN"/>
@@ -1425,7 +1423,6 @@
14251423
</scenes>
14261424
<inferredMetricsTieBreakers>
14271425
<segue reference="N3P-wt-Rn3"/>
1428-
<segue reference="Njv-lY-Lyi"/>
14291426
<segue reference="UV4-XI-c0q"/>
14301427
<segue reference="iD4-VS-n3M"/>
14311428
</inferredMetricsTieBreakers>

WordPressAuthenticator/Signin/LoginViewController.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,18 @@ open class LoginViewController: NUXViewController, LoginFacadeDelegate {
136136
}
137137

138138
/// Displays the self-hosted sign in form.
139+
///
139140
func loginToSelfHostedSite() {
140-
performSegue(withIdentifier: .showSelfHostedLogin, sender: self)
141+
guard let vc = LoginSiteAddressViewController.instantiate(from: .login) else {
142+
DDLogError("Failed to navigate from LoginViewController to LoginSiteAddressViewController")
143+
return
144+
}
145+
146+
vc.loginFields = loginFields
147+
vc.dismissBlock = dismissBlock
148+
vc.errorToPresent = errorToPresent
149+
150+
navigationController?.pushViewController(vc, animated: true)
141151
}
142152

143153
/// Validates what is entered in the various form fields and, if valid,

0 commit comments

Comments
 (0)