settings: add "Learn more about Admin mode" link

This commit is contained in:
yuyoyuppe 2020-03-26 21:53:27 +03:00 committed by Andrey Nekrasov
parent 60fa6071b9
commit e794604cae
3 changed files with 28 additions and 9 deletions

View File

@ -34,6 +34,8 @@ export class CustomActionSettingsControl extends BaseSettingsControl {
<Label>{this.state.property_values.display_name}</Label>
: null
}
{
<Stack horizontal tokens={{childrenGap:5}}>
{
this.state.property_values.value ?
<Text styles ={{
@ -43,6 +45,13 @@ export class CustomActionSettingsControl extends BaseSettingsControl {
}}>{this.state.property_values.value}</Text>
: <span/>
}
{
this.state.property_values.help_link ?
this.state.property_values.help_link
: <span/>
}
</Stack>
}
<PrimaryButton
styles={{
root: {

View File

@ -149,7 +149,17 @@ export class GeneralSettings extends React.Component <any, any> {
setting={{
display_name: '',
value: 'Running as user. Do you wish to run as administrator instead?',
button_text: 'Restart as administrator'
button_text: 'Restart as administrator',
help_link: <Link
styles = {{
root: {
alignSelf:'center',
paddingBottom: '0.5em'
}
}}
href={"https://aka.ms/powertoysDetectedElevatedHelp"}
target='_blank'
>(Learn more about Admin mode)</Link>
}}
action_name={'restart_elevation'}
action_callback={(action_name: any, value:any) => {

File diff suppressed because one or more lines are too long