diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-07-27 13:27:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 13:27:12 +0800 |
commit | 244b15ea5b7039ecca1614140cbcf62ba3379184 (patch) | |
tree | 0b043a9bcc4dc0f645c00d6f92279af63e4d8c9f /webapp | |
parent | 4132a02319a9cf07cbd13c989de9b891d89f8fb3 (diff) | |
download | chat-244b15ea5b7039ecca1614140cbcf62ba3379184.tar.gz chat-244b15ea5b7039ecca1614140cbcf62ba3379184.tar.bz2 chat-244b15ea5b7039ecca1614140cbcf62ba3379184.zip |
[PLT-7069] Remove shortcut key on Switch Channels when viewing on mobile web (#7012)
* remove shortcut key on Switch Channels when viewing on mobile web
* apply hidden-xs class for mobile view
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/sidebar.jsx | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx index 798ce5691..25ad51ba9 100644 --- a/webapp/components/sidebar.jsx +++ b/webapp/components/sidebar.jsx @@ -827,15 +827,22 @@ export default class Sidebar extends React.Component { ); } - const quickSwitchText = 'channel_switch_modal.title'; - - let quickSwitchTextShortcut = 'quick_switch_modal.channelsShortcut.windows'; - let quickSwitchDefault = '- CTRL+K'; + let quickSwitchTextShortcutId = 'quick_switch_modal.channelsShortcut.windows'; + let quickSwitchTextShortcutDefault = '- CTRL+K'; if (Utils.isMac()) { - quickSwitchTextShortcut = 'quick_switch_modal.channelsShortcut.mac'; - quickSwitchDefault = '- ⌘K'; + quickSwitchTextShortcutId = 'quick_switch_modal.channelsShortcut.mac'; + quickSwitchTextShortcutDefault = '- ⌘K'; } + const quickSwitchTextShortcut = ( + <span className='switch__shortcut hidden-xs'> + <FormattedMessage + id={quickSwitchTextShortcutId} + defaultMessage={quickSwitchTextShortcutDefault} + /> + </span> + ); + return ( <div className='sidebar--left' @@ -946,15 +953,10 @@ export default class Sidebar extends React.Component { dangerouslySetInnerHTML={{__html: switchChannelIcon}} /> <FormattedMessage - id={quickSwitchText} + id={'channel_switch_modal.title'} defaultMessage='Switch Channels' /> - <span className='switch__shortcut'> - <FormattedMessage - id={quickSwitchTextShortcut} - defaultMessage={quickSwitchDefault} - /> - </span> + {quickSwitchTextShortcut} </button> </div> </div> |