mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-10 12:50:29 +08:00
Improve menu key.
This commit is contained in:
@@ -194,9 +194,9 @@ class App extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleRightDropdownClick(e) {
|
handleRightDropdownClick(e) {
|
||||||
if (e.key === '201') {
|
if (e.key === '/account') {
|
||||||
this.props.history.push(`/account`);
|
this.props.history.push(`/account`);
|
||||||
} else if (e.key === '202') {
|
} else if (e.key === 'logout') {
|
||||||
this.logout();
|
this.logout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -220,11 +220,11 @@ class App extends Component {
|
|||||||
renderRightDropdown() {
|
renderRightDropdown() {
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu onClick={this.handleRightDropdownClick.bind(this)}>
|
<Menu onClick={this.handleRightDropdownClick.bind(this)}>
|
||||||
<Menu.Item key="201">
|
<Menu.Item key="/account">
|
||||||
<SettingOutlined />
|
<SettingOutlined />
|
||||||
{i18next.t("account:My Account")}
|
{i18next.t("account:My Account")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item key="202">
|
<Menu.Item key="/logout">
|
||||||
<LogoutOutlined />
|
<LogoutOutlined />
|
||||||
{i18next.t("account:Logout")}
|
{i18next.t("account:Logout")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
@@ -232,7 +232,7 @@ class App extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown key="200" overlay={menu} className="rightDropDown">
|
<Dropdown key="/rightDropDown" overlay={menu} className="rightDropDown">
|
||||||
<div className="ant-dropdown-link" style={{float: 'right', cursor: 'pointer'}}>
|
<div className="ant-dropdown-link" style={{float: 'right', cursor: 'pointer'}}>
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user