Render underlines and tooltips on custom server names in auth pages

See https://github.com/vector-im/riot-web/issues/9290
This commit is contained in:
Travis Ralston 2019-05-13 17:16:40 -06:00
parent 83737654ff
commit e4576dac28
8 changed files with 111 additions and 6 deletions

View file

@ -279,9 +279,16 @@ export default class PasswordLogin extends React.Component {
serverName: this.props.serverConfig.hsName,
});
if (this.props.serverConfig.hsNameIsDifferent) {
// TODO: TravisR - Use tooltip to underline
const TextWithTooltip = sdk.getComponent("elements.TextWithTooltip");
signInToText = _t('Sign in to your Matrix account on <underlinedServerName />', {}, {
'underlinedServerName': () => <u>{this.props.serverConfig.hsName}</u>,
'underlinedServerName': () => {
return <TextWithTooltip
class="mx_Login_underlinedServerName"
tooltip={this.props.serverConfig.hsUrl}>
{this.props.serverConfig.hsName}
</TextWithTooltip>;
},
});
}