@@ -124,8 +124,7 @@ class GetStartedViewController: LoginViewController, NUXKeyboardResponder {
124124 } ( )
125125
126126 private var showsContinueButtonAtTheBottom : Bool {
127- screenMode == . signInUsingSiteCredentials ||
128- configuration. enableSocialLogin == false
127+ configuration. enableSocialLogin == false
129128 }
130129
131130 override open var sourceTag : WordPressSupportSourceTag {
@@ -811,20 +810,32 @@ private extension GetStartedViewController {
811810
812811 buttonViewController. hideShadowView ( )
813812
814- // Add a "Continue" button here as the `continueButton` at the top
815- // will not be displayed for `signInUsingSiteCredentials` screen mode.
816- //
817- buttonViewController. setupTopButton ( title: ButtonConfiguration . Continue. title,
818- isPrimary: true ,
819- accessibilityIdentifier: ButtonConfiguration . Continue. accessibilityIdentifier) { [ weak self] in
820- self ? . handleSubmitButtonTapped ( )
821- }
813+ if configuration. enableSocialLogin {
814+ configureSocialButtons ( )
815+
816+ // Setup Sign in with site credentials button
817+ buttonViewController. setupTertiaryButton ( attributedTitle: WPStyleGuide . formattedSignInWithSiteCredentialsString ( ) ,
818+ isPrimary: false ,
819+ accessibilityIdentifier: ButtonConfiguration . SignInWithSiteCredentials. accessibilityIdentifier) { [ weak self] in
820+ self ? . handleSiteCredentialsButtonTapped ( )
821+ }
822+ } else {
823+ // Add a "Continue" button here as the `continueButton` at the top will be hidden
824+ //
825+ if showsContinueButtonAtTheBottom {
826+ buttonViewController. setupTopButton ( title: ButtonConfiguration . Continue. title,
827+ isPrimary: true ,
828+ accessibilityIdentifier: ButtonConfiguration . Continue. accessibilityIdentifier) { [ weak self] in
829+ self ? . handleSubmitButtonTapped ( )
830+ }
831+ }
822832
823- // Setup Sign in with site credentials button
824- buttonViewController. setupBottomButton ( attributedTitle: WPStyleGuide . formattedSignInWithSiteCredentialsString ( ) ,
825- isPrimary: false ,
826- accessibilityIdentifier: ButtonConfiguration . SignInWithSiteCredentials. accessibilityIdentifier) { [ weak self] in
827- self ? . handleSiteCredentialsButtonTapped ( )
833+ // Setup Sign in with site credentials button
834+ buttonViewController. setupBottomButton ( attributedTitle: WPStyleGuide . formattedSignInWithSiteCredentialsString ( ) ,
835+ isPrimary: false ,
836+ accessibilityIdentifier: ButtonConfiguration . SignInWithSiteCredentials. accessibilityIdentifier) { [ weak self] in
837+ self ? . handleSiteCredentialsButtonTapped ( )
838+ }
828839 }
829840 }
830841
@@ -835,12 +846,14 @@ private extension GetStartedViewController {
835846
836847 buttonViewController. hideShadowView ( )
837848
838- // Add a "Continue" button here as the `continueButton` at the top will be hidden
839- //
840- buttonViewController. setupTopButton ( title: ButtonConfiguration . Continue. title,
841- isPrimary: true ,
842- accessibilityIdentifier: ButtonConfiguration . Continue. accessibilityIdentifier) { [ weak self] in
843- self ? . handleSubmitButtonTapped ( )
849+ if showsContinueButtonAtTheBottom {
850+ // Add a "Continue" button here as the `continueButton` at the top will be hidden
851+ //
852+ buttonViewController. setupTopButton ( title: ButtonConfiguration . Continue. title,
853+ isPrimary: true ,
854+ accessibilityIdentifier: ButtonConfiguration . Continue. accessibilityIdentifier) { [ weak self] in
855+ self ? . handleSubmitButtonTapped ( )
856+ }
844857 }
845858 }
846859
0 commit comments