mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
PLT-3268 Made keyboard shortcuts open/close account settings and channel switcher (#3635)
* made keyboard shortcuts open/close account settings and channel switcher * made booleans toggle
This commit is contained in:
@@ -180,9 +180,7 @@ export default class Navbar extends React.Component {
|
||||
showChannelSwitchModal(e) {
|
||||
if (Utils.cmdOrCtrlPressed(e) && e.keyCode === Constants.KeyCodes.K) {
|
||||
e.preventDefault();
|
||||
this.setState({
|
||||
showChannelSwitchModal: true
|
||||
});
|
||||
this.setState({showChannelSwitchModal: !this.state.showChannelSwitchModal});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export default class NavbarDropdown extends React.Component {
|
||||
openAccountSettings(e) {
|
||||
if (Utils.cmdOrCtrlPressed(e) && e.shiftKey && e.keyCode === Constants.KeyCodes.A) {
|
||||
e.preventDefault();
|
||||
this.setState({showUserSettingsModal: true});
|
||||
this.setState({showUserSettingsModal: !this.state.showUserSettingsModal});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user