feat(device-selection): design tweaks (#2802)

- Change copy
- Add labels to dropdowns
- Adjust color and positioning
This commit is contained in:
virtuacoplenny
2018-04-27 18:43:11 -07:00
committed by GitHub
parent 0a0256501c
commit f4060975d1
9 changed files with 74 additions and 34 deletions
+25
View File
@@ -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
View File
@@ -1,6 +1,7 @@
export * from './actions';
export * from './actionTypes';
export * from './components';
export * from './functions';
import './middleware';
import './reducer';