feat(device-selection): design tweaks (#2802)
- Change copy - Add labels to dropdowns - Adjust color and positioning
This commit is contained in:
@@ -2,6 +2,20 @@
|
||||
|
||||
import { parseStandardURIString } from '../base/util';
|
||||
|
||||
declare var interfaceConfig: Object;
|
||||
|
||||
/**
|
||||
* Used for web. Indicates if the setting section is enabled.
|
||||
*
|
||||
* @param {string} settingName - 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.
|
||||
*/
|
||||
export function isSettingEnabled(settingName: string) {
|
||||
return interfaceConfig.SETTINGS_SECTIONS.includes(settingName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a URL entered by the user.
|
||||
* FIXME: Consider adding this to base/util/uri.
|
||||
@@ -35,3 +49,14 @@ export function normalizeUserInputURL(url: string) {
|
||||
|
||||
/* eslint-enable no-param-reassign */
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for web. Returns whether or not only Device Selection is configured to
|
||||
* display as a setting.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function shouldShowOnlyDeviceSelection() {
|
||||
return interfaceConfig.SETTINGS_SECTIONS.length === 1
|
||||
&& isSettingEnabled('devices');
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export * from './actions';
|
||||
export * from './actionTypes';
|
||||
export * from './components';
|
||||
export * from './functions';
|
||||
|
||||
import './middleware';
|
||||
import './reducer';
|
||||
|
||||
Reference in New Issue
Block a user