Implement force state for features like in the proposal

This commit is contained in:
Travis Ralston 2020-08-17 13:51:41 -06:00
parent 3659115921
commit 4f851542ac
3 changed files with 9 additions and 6 deletions

View file

@ -35,7 +35,8 @@ export class LabsSettingToggle extends React.Component {
render() {
const label = SettingsStore.getDisplayName(this.props.featureId);
const value = SettingsStore.getValue(this.props.featureId);
return <LabelledToggleSwitch value={value} label={label} onChange={this._onChange} />;
const canChange = SettingsStore.canSetValue(this.props.featureId, null, SettingLevel.DEVICE);
return <LabelledToggleSwitch value={value} label={label} onChange={this._onChange} disabled={!canChange} />;
}
}