diff --git a/css/modals/device-selection/_device-selection.scss b/css/modals/device-selection/_device-selection.scss index 3dc68ef32..d608a909d 100644 --- a/css/modals/device-selection/_device-selection.scss +++ b/css/modals/device-selection/_device-selection.scss @@ -4,11 +4,7 @@ > div { display: block; - margin-bottom: 10px; - } - - > div:last-child { - margin-bottom: 5px; + margin-bottom: 4px; } .device-selector-icon { @@ -18,6 +14,10 @@ margin-left: 3px; } + .device-selector-label { + margin-bottom: 1px; + } + /* device-selector-trigger stylings attempt to mimic AtlasKit button */ .device-selector-trigger { background-color: #0E1624; @@ -101,7 +101,6 @@ .audio-output-preview { font-size: 14px; - margin-top: 10px; a { color: 4C9AFF; @@ -111,9 +110,9 @@ } .audio-input-preview { - background: #7b7b7b; + background: #1B2638; border-radius: 5px; - height: 6px; + height: 8px; .audio-input-preview-level { background: #4C9AFF; diff --git a/lang/main.json b/lang/main.json index 0de3da582..efd6f46dd 100644 --- a/lang/main.json +++ b/lang/main.json @@ -440,7 +440,7 @@ "noPermission": "Permission not granted", "previewUnavailable": "Preview unavailable", "selectADevice": "Select a device", - "testAudio": "Test sound" + "testAudio": "Play a test sound" }, "videoStatus": { "callQuality": "Call Quality", diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 47b190cea..a71c5954e 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -35,6 +35,7 @@ import { setNotificationsEnabled, showWarningNotification } from '../../react/features/notifications'; +import { shouldShowOnlyDeviceSelection } from '../../react/features/settings'; import { dockToolbox, showToolbox @@ -104,8 +105,7 @@ const UIListeners = new Map([ // opened through a button in settings and not directly displayed in // settings itself. As it is not useful to only have a settings menu // with a button to open a dialog, open the dialog directly instead. - if (interfaceConfig.SETTINGS_SECTIONS.length === 1 - && UIUtil.isSettingEnabled('devices')) { + if (shouldShowOnlyDeviceSelection()) { APP.store.dispatch(openDeviceSelectionDialog()); } else { UI.toggleSidePanel('settings_container'); diff --git a/modules/UI/side_pannels/settings/SettingsMenu.js b/modules/UI/side_pannels/settings/SettingsMenu.js index fbf7ff372..8e72c9e85 100644 --- a/modules/UI/side_pannels/settings/SettingsMenu.js +++ b/modules/UI/side_pannels/settings/SettingsMenu.js @@ -8,7 +8,10 @@ import { I18nextProvider } from 'react-i18next'; import { Provider } from 'react-redux'; import { i18next } from '../../../../react/features/base/i18n'; -import { SettingsMenu } from '../../../../react/features/settings'; +import { + SettingsMenu, + isSettingEnabled +} from '../../../../react/features/settings'; import UIUtil from '../../util/UIUtil'; /* eslint-enable no-unused-vars */ @@ -23,9 +26,9 @@ export default { $('#sideToolbarContainer').append(settingsMenuContainer); const props = { - showDeviceSettings: UIUtil.isSettingEnabled('devices'), - showLanguageSettings: UIUtil.isSettingEnabled('language'), - showModeratorSettings: UIUtil.isSettingEnabled('moderator'), + showDeviceSettings: isSettingEnabled('devices'), + showLanguageSettings: isSettingEnabled('language'), + showModeratorSettings: isSettingEnabled('moderator'), showTitles: interfaceConfig.SETTINGS_SECTIONS.length > 1 }; diff --git a/modules/UI/util/UIUtil.js b/modules/UI/util/UIUtil.js index be71e5e21..c070a8c25 100644 --- a/modules/UI/util/UIUtil.js +++ b/modules/UI/util/UIUtil.js @@ -121,18 +121,6 @@ const UIUtil = { } }, - /** - * Indicates if the setting section is enabled. - * - * @param name the name of the setting section as defined in - * interface_config.js and SettingsMenu.js - * @returns {boolean} {true} to indicate that the given setting section - * is enabled, {false} - otherwise - */ - isSettingEnabled(name) { - return interfaceConfig.SETTINGS_SECTIONS.indexOf(name) !== -1; - }, - /** * Indicates if Authentication Section should be shown * diff --git a/react/features/device-selection/components/DeviceSelectionDialogBase.js b/react/features/device-selection/components/DeviceSelectionDialogBase.js index f2d199b4c..e302a3488 100644 --- a/react/features/device-selection/components/DeviceSelectionDialogBase.js +++ b/react/features/device-selection/components/DeviceSelectionDialogBase.js @@ -5,6 +5,8 @@ import { StatelessDialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; import { createLocalTrack } from '../../base/lib-jitsi-meet'; +import { shouldShowOnlyDeviceSelection } from '../../settings'; + import AudioInputPreview from './AudioInputPreview'; import AudioOutputPreview from './AudioOutputPreview'; import DeviceSelector from './DeviceSelector'; @@ -218,7 +220,7 @@ class DeviceSelectionDialogBase extends Component { okTitleKey = { 'dialog.Save' } onCancel = { this._onCancel } onSubmit = { this._onSubmit } - titleKey = 'deviceSelection.deviceSettings'> + titleKey = { this._getModalTitle() }>