diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-08-18 17:04:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-18 17:04:05 +0800 |
commit | 9097289c2ce2b719a5aa0f9d567594f2b6a7e30b (patch) | |
tree | c8fb16e11052489047157738ee454dafc8c37d04 /webapp/actions | |
parent | 96eab1202717e073782ec399a4e0820cae15b1bb (diff) | |
download | chat-9097289c2ce2b719a5aa0f9d567594f2b6a7e30b.tar.gz chat-9097289c2ce2b719a5aa0f9d567594f2b6a7e30b.tar.bz2 chat-9097289c2ce2b719a5aa0f9d567594f2b6a7e30b.zip |
[PLT-3377] Open up a shortcuts dialog instead of printing help text (#7064)
* open up a shortcuts dialog instead of printing help text
* Updating UI for keyboard shortcuts modal
* update PR per PLT-7284
* fix typo error
* fix mixed up shortcut keys
* move to client side
* fix shortcuts list, remove unused function and revert server side code for autocompletion
* remove quick team switcher
Diffstat (limited to 'webapp/actions')
-rw-r--r-- | webapp/actions/channel_actions.jsx | 8 | ||||
-rw-r--r-- | webapp/actions/global_actions.jsx | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx index 78df1ff17..1df0d12f5 100644 --- a/webapp/actions/channel_actions.jsx +++ b/webapp/actions/channel_actions.jsx @@ -66,12 +66,10 @@ export function executeCommand(message, args, success, error) { const err = {message: Utils.localizeMessage('create_post.shortcutsNotSupported', 'Keyboard shortcuts are not supported on your device')}; error(err); return; - } else if (Utils.isMac()) { - msg += ' mac'; - } else if (message.indexOf('mac') !== -1) { - msg = '/shortcuts'; } - break; + + GlobalActions.showShortcutsModal(); + return; case '/leave': { // /leave command not supported in reply threads. if (args.channel_id && (args.root_id || args.parent_id)) { diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx index a163db126..0b7c8f7b1 100644 --- a/webapp/actions/global_actions.jsx +++ b/webapp/actions/global_actions.jsx @@ -211,6 +211,13 @@ export function showAccountSettingsModal() { }); } +export function showShortcutsModal() { + AppDispatcher.handleViewAction({ + type: ActionTypes.TOGGLE_SHORTCUTS_MODAL, + value: true + }); +} + export function showDeletePostModal(post, commentCount = 0) { AppDispatcher.handleViewAction({ type: ActionTypes.TOGGLE_DELETE_POST_MODAL, |