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

@ -194,9 +194,16 @@ module.exports = React.createClass({
serverName: this.props.serverConfig.hsName,
});
if (this.props.serverConfig.hsNameIsDifferent) {
// TODO: TravisR - Use tooltip to underline
const TextWithTooltip = sdk.getComponent("elements.TextWithTooltip");
yourMatrixAccountText = _t('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>;
},
});
}