{formatMessage(shortcuts.msgHeader)}
- {renderShortcut(formatMessage(shortcuts.msgMarkAsRead))}
{formatMessage(shortcuts.msgInputHeader)}
{renderShortcut(formatMessage(shortcuts.msgEdit))}
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index 87da9c9436..4bb9542ef2 100755
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -2156,7 +2156,8 @@
"shortcuts.files.header": "Files",
"shortcuts.files.upload": "Upload files:\tCtrl|U",
"shortcuts.files.upload.mac": "Upload files:\t⌘|U",
- "shortcuts.header": "Keyboard Shortcuts",
+ "shortcuts.header": "Keyboard Shortcuts\tCtrl|/",
+ "shortcuts.header.mac": "Keyboard Shortcuts\t⌘|/",
"shortcuts.info": "Begin a message with / for a list of all the commands at your disposal.",
"shortcuts.msgs.comp.channel": "Channel:\t~|[a-z]|Tab",
"shortcuts.msgs.comp.emoji": "Emoji:\t:|[a-z]|Tab",
@@ -2165,7 +2166,6 @@
"shortcuts.msgs.edit": "Edit last message in channel:\tUp",
"shortcuts.msgs.header": "Messages",
"shortcuts.msgs.input.header": "Works inside an empty input field",
- "shortcuts.msgs.mark_as_read": "Mark current channel as read:\tEsc",
"shortcuts.msgs.reply": "Reply to last message in channel:\tShift|Up",
"shortcuts.msgs.reprint_next": "Reprint next message:\tCtrl|Down",
"shortcuts.msgs.reprint_next.mac": "Reprint next message:\t⌘|Down",
diff --git a/webapp/sass/routes/_shortcuts-modal.scss b/webapp/sass/routes/_shortcuts-modal.scss
index 817239f2f0..854340b2cc 100644
--- a/webapp/sass/routes/_shortcuts-modal.scss
+++ b/webapp/sass/routes/_shortcuts-modal.scss
@@ -11,18 +11,43 @@
background: transparent;
border: none;
color: inherit;
- padding: 40px 40px 20px;
+ padding: 20px 40px 20px;
.close {
color: inherit;
font-size: 28px;
font-weight: normal;
right: 35px;
+ top: 35px;
}
.modal-title {
color: inherit;
font-size: 20px;
+
+ > div {
+ &:first-child {
+ margin-bottom: 2.5em;
+ }
+ }
+
+ .shortcut-line {
+ margin: 17px 0;
+
+ span {
+ &:first-child {
+ margin-right: 5px;
+ }
+ }
+
+ .shortcut-key {
+ border-radius: 3px;
+ font-size: .9em;
+ font-weight: 500;
+ margin: 5px 0 5px 5px;
+ padding: 1px 5px;
+ }
+ }
}
}
}
diff --git a/webapp/tests/components/__snapshots__/shortcuts_modal.test.jsx.snap b/webapp/tests/components/__snapshots__/shortcuts_modal.test.jsx.snap
new file mode 100644
index 0000000000..cfe719ba4a
--- /dev/null
+++ b/webapp/tests/components/__snapshots__/shortcuts_modal.test.jsx.snap
@@ -0,0 +1,237 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`components/ShortcutsModal should match snapshot modal for Mac 1`] = `
+
+
+
+
+
+
+
+`;
+
+exports[`components/ShortcutsModal should match snapshot modal for non-Mac like Windows/Linux 1`] = `
+
+
+
+
+
+
+
+`;
diff --git a/webapp/tests/components/shortcuts_modal.test.jsx b/webapp/tests/components/shortcuts_modal.test.jsx
new file mode 100644
index 0000000000..04fa51a766
--- /dev/null
+++ b/webapp/tests/components/shortcuts_modal.test.jsx
@@ -0,0 +1,25 @@
+// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import React from 'react';
+
+import {mountWithIntl} from 'tests/helpers/intl-test-helper.jsx';
+import ShortcutsModal from 'components/shortcuts_modal.jsx';
+
+describe('components/ShortcutsModal', () => {
+ test('should match snapshot modal for Mac', () => {
+ const wrapper = mountWithIntl(
+
+ );
+
+ expect(wrapper).toMatchSnapshot();
+ });
+
+ test('should match snapshot modal for non-Mac like Windows/Linux', () => {
+ const wrapper = mountWithIntl(
+
+ );
+
+ expect(wrapper).toMatchSnapshot();
+ });
+});