mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
remove extra parentheses showing account numbers (#726)
This commit is contained in:
parent
c05fb77224
commit
8e48bddf5f
@ -23,6 +23,14 @@ class SelfLoginButton extends React.Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getAccountShowName() {
|
||||||
|
let {name, displayName} = this.props.account;
|
||||||
|
if (displayName !== '') {
|
||||||
|
name += ' (' + displayName + ')';
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const config = {
|
const config = {
|
||||||
icon: this.generateIcon(),
|
icon: this.generateIcon(),
|
||||||
@ -32,7 +40,7 @@ class SelfLoginButton extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const SelfLoginButton = createButton(config);
|
const SelfLoginButton = createButton(config);
|
||||||
return <SelfLoginButton text={`${this.props.account.name} (${this.props.account.displayName})`} onClick={() => this.props.onClick()} align={"center"} />
|
return <SelfLoginButton text={this.getAccountShowName()} onClick={() => this.props.onClick()} align={"center"}/>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user