Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

refactor(settings): show shortcuts in settings if it is in the list

emrahc070495b6a6d
diff --git a/interface_config.js b/interface_config.js
index 1e774b35aa..14b307af34 100644
--- a/interface_config.js
+++ b/interface_config.js
@@ -110,7 +110,7 @@ var interfaceConfig = {
RECENT_LIST_ENABLED: true,
REMOTE_THUMBNAIL_RATIO: 1, // 1:1
- SETTINGS_SECTIONS: [ 'devices', 'language', 'moderator', 'profile', 'calendar', 'sounds', 'more' ],
+ SETTINGS_SECTIONS: [ 'devices', 'language', 'moderator', 'profile', 'calendar', 'shortcuts', 'sounds', 'more' ],
/**
* Specify which sharing features should be displayed. If the value is not set
diff --git a/react/features/settings/components/web/SettingsDialog.tsx b/react/features/settings/components/web/SettingsDialog.tsx
index 24f6b84b22..c672389227 100644
--- a/react/features/settings/components/web/SettingsDialog.tsx
+++ b/react/features/settings/components/web/SettingsDialog.tsx
@@ -137,6 +137,7 @@ function _mapStateToProps(state: IReduxState, ownProps: any) {
= configuredTabs.includes('profile') && !state['features/base/config'].disableProfile;
const showCalendarSettings
= configuredTabs.includes('calendar') && isCalendarEnabled(state);
+ const showShortcutsSettings = configuredTabs.includes('shortcuts');
const showSoundsSettings = configuredTabs.includes('sounds');
const enabledNotifications = getNotificationsMap(state);
const showNotificationsSettings = Object.keys(enabledNotifications).length > 0;
@@ -293,22 +294,24 @@ function _mapStateToProps(state: IReduxState, ownProps: any) {
});
}
- !_iAmVisitor && tabs.push({
- name: SETTINGS_TABS.SHORTCUTS,
- component: ShortcutsTab,
- labelKey: 'settings.shortcuts',
- props: getShortcutsTabProps(state, isDisplayedOnWelcomePage),
- propsUpdateFunction: (tabState: any, newProps: ReturnType<typeof getShortcutsTabProps>) => {
- // Updates tab props, keeping users selection
+ if (showShortcutsSettings && !_iAmVisitor) {
+ tabs.push({
+ name: SETTINGS_TABS.SHORTCUTS,
+ component: ShortcutsTab,
+ labelKey: 'settings.shortcuts',
+ props: getShortcutsTabProps(state, isDisplayedOnWelcomePage),
+ propsUpdateFunction: (tabState: any, newProps: ReturnType<typeof getShortcutsTabProps>) => {
+ // Updates tab props, keeping users selection
- return {
- ...newProps,
- keyboardShortcutsEnabled: tabState?.keyboardShortcutsEnabled
- };
- },
- submit: submitShortcutsTab,
- icon: IconShortcuts
- });
+ return {
+ ...newProps,
+ keyboardShortcutsEnabled: tabState?.keyboardShortcutsEnabled
+ };
+ },
+ submit: submitShortcutsTab,
+ icon: IconShortcuts
+ });
+ }
if (showMoreTab && !_iAmVisitor) {
tabs.push({