"Download updates automatically" toggle enabled only for administrator account (#2357)
* Added condition to disable auto updates toggle in settings for non-administrator accounts
This commit is contained in:
parent
8ccc996e63
commit
55c311cd39
|
@ -44,7 +44,7 @@ export class GeneralSettings extends React.Component <any, any> {
|
|||
});
|
||||
let result : any = {};
|
||||
result[this.state.settings_key]= {
|
||||
download_updates_automatically: this.download_updates_automatically_reference.get_value().value,
|
||||
download_updates_automatically: this.download_updates_automatically_reference != null && this.download_updates_automatically_reference.get_value().value,
|
||||
startup: this.startup_reference.get_value().value,
|
||||
run_elevated: this.elevated_reference != null && this.elevated_reference.get_value().value,
|
||||
theme: this.theme_reference.get_value().value,
|
||||
|
@ -125,14 +125,16 @@ export class GeneralSettings extends React.Component <any, any> {
|
|||
<Separator />
|
||||
<Text variant='xLarge'>General</Text>
|
||||
|
||||
<Stack>
|
||||
{this.state.settings.general.is_admin &&
|
||||
(<Stack>
|
||||
<Label>Download updates automatically</Label>
|
||||
<BoolToggleSettingsControl
|
||||
setting={{value: this.state.settings.general.download_updates_automatically}}
|
||||
disabled={!this.state.settings.general.is_admin}
|
||||
on_change={this.parent_on_change}
|
||||
ref={(input) => {this.download_updates_automatically_reference=input;}}
|
||||
/>
|
||||
</Stack>
|
||||
</Stack>)}
|
||||
|
||||
|
||||
<Stack>
|
||||
|
|
2
src/settings/settings-html/dist/bundle.js
vendored
2
src/settings/settings-html/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue