@@ -502,6 +502,11 @@ export default class Registration extends React.Component {
502502 return null ;
503503 }
504504
505+ // Hide the server picker once the user is doing UI Auth unless encountered a fatal server error
506+ if ( this . state . phase !== PHASE_SERVER_DETAILS && this . state . doingUIAuth && ! this . state . serverErrorIsFatal ) {
507+ return null ;
508+ }
509+
505510 // If we're on a different phase, we only show the server type selector,
506511 // which is always shown if we allow custom URLs at all.
507512 // (if there's a fatal server error, we need to show the full server
@@ -582,25 +587,13 @@ export default class Registration extends React.Component {
582587 < Spinner />
583588 </ div > ;
584589 } else if ( this . state . flows . length ) {
585- let onEditServerDetailsClick = null ;
586- // If custom URLs are allowed and we haven't selected the Free server type, wire
587- // up the server details edit link.
588- if (
589- PHASES_ENABLED &&
590- ! SdkConfig . get ( ) [ 'disable_custom_urls' ] &&
591- this . state . serverType !== ServerType . FREE
592- ) {
593- onEditServerDetailsClick = this . onEditServerDetailsClick ;
594- }
595-
596590 return < RegistrationForm
597591 defaultUsername = { this . state . formVals . username }
598592 defaultEmail = { this . state . formVals . email }
599593 defaultPhoneCountry = { this . state . formVals . phoneCountry }
600594 defaultPhoneNumber = { this . state . formVals . phoneNumber }
601595 defaultPassword = { this . state . formVals . password }
602596 onRegisterClick = { this . onFormSubmit }
603- onEditServerDetailsClick = { onEditServerDetailsClick }
604597 flows = { this . state . flows }
605598 serverConfig = { this . props . serverConfig }
606599 canSubmit = { ! this . state . serverErrorIsFatal }
@@ -686,11 +679,48 @@ export default class Registration extends React.Component {
686679 { regDoneText }
687680 </ div > ;
688681 } else {
682+ let yourMatrixAccountText = _t ( 'Create your Matrix account on %(serverName)s' , {
683+ serverName : this . props . serverConfig . hsName ,
684+ } ) ;
685+ if ( this . props . serverConfig . hsNameIsDifferent ) {
686+ const TextWithTooltip = sdk . getComponent ( "elements.TextWithTooltip" ) ;
687+
688+ yourMatrixAccountText = _t ( 'Create your Matrix account on <underlinedServerName />' , { } , {
689+ 'underlinedServerName' : ( ) => {
690+ return < TextWithTooltip
691+ class = "mx_Login_underlinedServerName"
692+ tooltip = { this . props . serverConfig . hsUrl }
693+ >
694+ { this . props . serverConfig . hsName }
695+ </ TextWithTooltip > ;
696+ } ,
697+ } ) ;
698+ }
699+
700+ // If custom URLs are allowed, user is not doing UIA flows and they haven't selected the Free server type,
701+ // wire up the server details edit link.
702+ let editLink = null ;
703+ if ( PHASES_ENABLED &&
704+ ! SdkConfig . get ( ) [ 'disable_custom_urls' ] &&
705+ this . state . serverType !== ServerType . FREE &&
706+ ! this . state . doingUIAuth
707+ ) {
708+ editLink = (
709+ < a className = "mx_AuthBody_editServerDetails" href = "#" onClick = { this . onEditServerDetailsClick } >
710+ { _t ( 'Change' ) }
711+ </ a >
712+ ) ;
713+ }
714+
689715 body = < div >
690716 < h2 > { _t ( 'Create your account' ) } </ h2 >
691717 { errorText }
692718 { serverDeadSection }
693719 { this . renderServerComponent ( ) }
720+ { this . state . phase !== PHASE_SERVER_DETAILS && < h3 >
721+ { yourMatrixAccountText }
722+ { editLink }
723+ </ h3 > }
694724 { this . renderRegisterComponent ( ) }
695725 { goBack }
696726 { signIn }
0 commit comments