mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
settings: remove Restart as a user button in an elevated context (#1328)
This commit is contained in:
@@ -140,16 +140,12 @@ export class GeneralSettings extends React.Component <any, any> {
|
|||||||
ref={(input) => {this.elevated_reference=input;}}
|
ref={(input) => {this.elevated_reference=input;}}
|
||||||
/>)
|
/>)
|
||||||
}
|
}
|
||||||
{this.state.settings.general.is_admin &&
|
{this.state.settings.general.is_admin && !this.state.settings.general.is_elevated &&
|
||||||
(<CustomActionSettingsControl
|
(<CustomActionSettingsControl
|
||||||
setting={{
|
setting={{
|
||||||
display_name: '',
|
display_name: '',
|
||||||
value: this.state.settings.general.is_elevated ?
|
value: 'Running as user. Do you wish to run as administrator instead?',
|
||||||
'Running as administrator. Do you wish to run as user instead?' :
|
button_text: 'Restart as administrator'
|
||||||
'Running as user. Do you wish to run as administrator instead?',
|
|
||||||
button_text: this.state.settings.general.is_elevated ?
|
|
||||||
'Restart as user' :
|
|
||||||
'Restart as administrator'
|
|
||||||
}}
|
}}
|
||||||
action_name={'restart_elevation'}
|
action_name={'restart_elevation'}
|
||||||
action_callback={(action_name: any, value:any) => {
|
action_callback={(action_name: any, value:any) => {
|
||||||
|
|||||||
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
Reference in New Issue
Block a user