@@ -502,17 +502,9 @@ export default class Registration extends React.Component {
502502 return null ;
503503 }
504504
505- // If we're on a different phase, we only show the server type selector,
506- // which is always shown if we allow custom URLs at all.
507- // (if there's a fatal server error, we need to show the full server
508- // config as the user may need to change servers to resolve the error).
509- if ( PHASES_ENABLED && this . state . phase !== PHASE_SERVER_DETAILS && ! this . state . serverErrorIsFatal ) {
510- return < div >
511- < ServerTypeSelector
512- selected = { this . state . serverType }
513- onChange = { this . onServerTypeChange }
514- />
515- </ div > ;
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 ;
516508 }
517509
518510 const serverDetailsProps = { } ;
@@ -582,25 +574,13 @@ export default class Registration extends React.Component {
582574 < Spinner />
583575 </ div > ;
584576 } 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-
596577 return < RegistrationForm
597578 defaultUsername = { this . state . formVals . username }
598579 defaultEmail = { this . state . formVals . email }
599580 defaultPhoneCountry = { this . state . formVals . phoneCountry }
600581 defaultPhoneNumber = { this . state . formVals . phoneNumber }
601582 defaultPassword = { this . state . formVals . password }
602583 onRegisterClick = { this . onFormSubmit }
603- onEditServerDetailsClick = { onEditServerDetailsClick }
604584 flows = { this . state . flows }
605585 serverConfig = { this . props . serverConfig }
606586 canSubmit = { ! this . state . serverErrorIsFatal }
@@ -686,11 +666,48 @@ export default class Registration extends React.Component {
686666 { regDoneText }
687667 </ div > ;
688668 } else {
669+ let yourMatrixAccountText = _t ( 'Create your Matrix account on %(serverName)s' , {
670+ serverName : this . props . serverConfig . hsName ,
671+ } ) ;
672+ if ( this . props . serverConfig . hsNameIsDifferent ) {
673+ const TextWithTooltip = sdk . getComponent ( "elements.TextWithTooltip" ) ;
674+
675+ yourMatrixAccountText = _t ( 'Create your Matrix account on <underlinedServerName />' , { } , {
676+ 'underlinedServerName' : ( ) => {
677+ return < TextWithTooltip
678+ class = "mx_Login_underlinedServerName"
679+ tooltip = { this . props . serverConfig . hsUrl }
680+ >
681+ { this . props . serverConfig . hsName }
682+ </ TextWithTooltip > ;
683+ } ,
684+ } ) ;
685+ }
686+
687+ // If custom URLs are allowed, user is not doing UIA flows and they haven't selected the Free server type,
688+ // wire up the server details edit link.
689+ let editLink = null ;
690+ if ( PHASES_ENABLED &&
691+ ! SdkConfig . get ( ) [ 'disable_custom_urls' ] &&
692+ this . state . serverType !== ServerType . FREE &&
693+ ! this . state . doingUIAuth
694+ ) {
695+ editLink = (
696+ < a className = "mx_AuthBody_editServerDetails" href = "#" onClick = { this . onEditServerDetailsClick } >
697+ { _t ( 'Change' ) }
698+ </ a >
699+ ) ;
700+ }
701+
689702 body = < div >
690703 < h2 > { _t ( 'Create your account' ) } </ h2 >
691704 { errorText }
692705 { serverDeadSection }
693706 { this . renderServerComponent ( ) }
707+ < h3 >
708+ { yourMatrixAccountText }
709+ { editLink }
710+ </ h3 >
694711 { this . renderRegisterComponent ( ) }
695712 { goBack }
696713 { signIn }
0 commit comments