[MM-36428][MM-36434][MM-36435] Keyboard navigation and menu updates for new tab/dropdown layout (#1695)
* [MM-36428][MM-36434][MM-36435] Keyboard navigation and menu updates for new tab/dropdown layout * Shortcuts for Windows/Linux * Update config.yml * Fixed up the shortcuts * Fixed the new server modal popping up where there are GPO teams only
This commit is contained in:
@@ -400,6 +400,7 @@ export default class MainPage extends React.PureComponent<Props, State> {
|
||||
<DotsVerticalIcon/>
|
||||
</button>
|
||||
<TeamDropdownButton
|
||||
isDisabled={this.state.modalOpen}
|
||||
activeServerName={this.state.activeServerName}
|
||||
totalMentionCount={totalMentionCount}
|
||||
hasUnreads={totalUnreadCount > 0}
|
||||
|
@@ -10,6 +10,7 @@ import '../css/components/TeamDropdownButton.scss';
|
||||
import '../css/compass-icons.css';
|
||||
|
||||
type Props = {
|
||||
isDisabled?: boolean;
|
||||
activeServerName: string;
|
||||
totalMentionCount: number;
|
||||
hasUnreads: boolean;
|
||||
@@ -18,7 +19,7 @@ type Props = {
|
||||
}
|
||||
|
||||
const TeamDropdownButton: React.FC<Props> = (props: Props) => {
|
||||
const {activeServerName, totalMentionCount, hasUnreads, isMenuOpen, darkMode} = props;
|
||||
const {isDisabled, activeServerName, totalMentionCount, hasUnreads, isMenuOpen, darkMode} = props;
|
||||
|
||||
const handleToggleButton = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
event.preventDefault();
|
||||
@@ -41,7 +42,9 @@ const TeamDropdownButton: React.FC<Props> = (props: Props) => {
|
||||
|
||||
return (
|
||||
<button
|
||||
disabled={isDisabled}
|
||||
className={classNames('TeamDropdownButton', {
|
||||
disabled: isDisabled,
|
||||
isMenuOpen,
|
||||
darkMode,
|
||||
})}
|
||||
|
Reference in New Issue
Block a user