mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 04:53:17 +00:00
Adding keyboard shortcuts in Settings
This is the initial pass at adding keyboard shortcuts to the Settings page. In this commit, the `ShortcutsSection` class has been created and is applied to a newly-added 'Keyboard Shortcuts' nav item. The template for ShortcutsSection is essentially multiple settings cards containing one table of keyboard short- cuts organized by their underlying functionality. The HTML `<kbd>` tag was defined in preference.css which styles the element to look like a keyboard key, similar to StackOverflow or GitHub.
This commit is contained in:
@@ -7,6 +7,7 @@ const Nav = require(__dirname + '/js/pages/preference/nav.js');
|
||||
const ServersSection = require(__dirname + '/js/pages/preference/servers-section.js');
|
||||
const GeneralSection = require(__dirname + '/js/pages/preference/general-section.js');
|
||||
const NetworkSection = require(__dirname + '/js/pages/preference/network-section.js');
|
||||
const ShortcutsSection = require(__dirname + '/js/pages/preference/shortcuts-section.js');
|
||||
|
||||
class PreferenceView extends BaseComponent {
|
||||
constructor() {
|
||||
@@ -56,6 +57,12 @@ class PreferenceView extends BaseComponent {
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'Keyboard Shortcuts': {
|
||||
this.section = new ShortcutsSection({
|
||||
$root: this.$settingsContainer
|
||||
});
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
this.section.init();
|
||||
|
||||
Reference in New Issue
Block a user