Merge pull request #2965 from matrix-org/travis/wk/tooltip

Render underlines and tooltips on custom server names in auth pages
This commit is contained in:
Travis Ralston 2019-05-15 14:13:44 -06:00 committed by GitHub
commit 60a13652df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 114 additions and 6 deletions

View file

@ -194,9 +194,17 @@ 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>;
},
});
}