Updates screeens

This commit is contained in:
Niels Laute
2021-08-02 01:03:10 +02:00
parent 04f2de09d7
commit d11d2a5b46
2 changed files with 87 additions and 152 deletions

View File

@@ -736,7 +736,7 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<data name="On.Content" xml:space="preserve"> <data name="On.Content" xml:space="preserve">
<value>On</value> <value>On</value>
</data> </data>
<data name="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link.Text" xml:space="preserve"> <data name="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link.Content" xml:space="preserve">
<value>Learn more about administrator mode</value> <value>Learn more about administrator mode</value>
</data> </data>
<data name="GeneralPage_ToggleSwitch_AutoDownloadUpdates.Header" xml:space="preserve"> <data name="GeneralPage_ToggleSwitch_AutoDownloadUpdates.Header" xml:space="preserve">
@@ -796,7 +796,7 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<data name="General_Repository.Label" xml:space="preserve"> <data name="General_Repository.Label" xml:space="preserve">
<value>GitHub repository</value> <value>GitHub repository</value>
</data> </data>
<data name="General_Updates.Text" xml:space="preserve"> <data name="General_Updates.Header" xml:space="preserve">
<value>Updates</value> <value>Updates</value>
</data> </data>
<data name="General_Version.Text" xml:space="preserve"> <data name="General_Version.Text" xml:space="preserve">
@@ -808,10 +808,10 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<data name="General_Version.AutomationProperties.Name" xml:space="preserve"> <data name="General_Version.AutomationProperties.Name" xml:space="preserve">
<value>Version</value> <value>Version</value>
</data> </data>
<data name="Admin_mode.Text" xml:space="preserve"> <data name="Admin_mode.Header" xml:space="preserve">
<value>Administrator mode</value> <value>Administrator mode</value>
</data> </data>
<data name="General_RunAsAdminRequired.Text" xml:space="preserve"> <data name="General_RunAsAdminRequired.Message" xml:space="preserve">
<value>* You need to run as administrator to use this setting.</value> <value>* You need to run as administrator to use this setting.</value>
</data> </data>
<data name="ShortcutWarningLabel.Text" xml:space="preserve"> <data name="ShortcutWarningLabel.Text" xml:space="preserve">
@@ -1316,8 +1316,8 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and
<data name="Oobe_Awake_TipsAndTricks.Text" xml:space="preserve"> <data name="Oobe_Awake_TipsAndTricks.Text" xml:space="preserve">
<value>You can always change modes quickly by {right-clicking the Awake icon} in the system tray.</value> <value>You can always change modes quickly by {right-clicking the Awake icon} in the system tray.</value>
</data> </data>
<data name="General_FailedToDownloadTheNewVersion.Text" xml:space="preserve"> <data name="General_FailedToDownloadTheNewVersion.Message" xml:space="preserve">
<value>* An error occurred trying to update to</value> <value>An error occurred trying to install this update</value>
</data> </data>
<data name="General_InstallNow.Content" xml:space="preserve"> <data name="General_InstallNow.Content" xml:space="preserve">
<value>Install now</value> <value>Install now</value>
@@ -1334,13 +1334,13 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and
<data name="General_TryAgainToDownloadAndInstall.Content" xml:space="preserve"> <data name="General_TryAgainToDownloadAndInstall.Content" xml:space="preserve">
<value>Try again to download and install</value> <value>Try again to download and install</value>
</data> </data>
<data name="General_CheckingForUpdates.Text" xml:space="preserve"> <data name="General_CheckingForUpdates.Message" xml:space="preserve">
<value>Checking for updates...</value> <value>Checking for updates...</value>
</data> </data>
<data name="General_NewVersionReadyToInstall.Text" xml:space="preserve"> <data name="General_NewVersionReadyToInstall.Message" xml:space="preserve">
<value>A new version is ready to install:</value> <value>A new version is ready to install</value>
</data> </data>
<data name="General_UpToDate.Text" xml:space="preserve"> <data name="General_UpToDate.Message" xml:space="preserve">
<value>PowerToys is up to date</value> <value>PowerToys is up to date</value>
</data> </data>
<data name="General_DownloadAndInstall.Content" xml:space="preserve"> <data name="General_DownloadAndInstall.Content" xml:space="preserve">

View File

@@ -27,48 +27,34 @@
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock x:Uid="Admin_Mode" <muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
FontWeight="SemiBold" <muxc:Expander.Header>
TextWrapping="Wrap" <controls:Setting x:Uid="Admin_Mode" Icon="&#xE1A7;" Description="{Binding Mode=TwoWay, Path=RunningAsText}" Style="{StaticResource ExpanderHeaderSettingStyle}">
AutomationProperties.HeadingLevel="Level2" <controls:Setting.ActionContent>
Style="{StaticResource SubtitleTextBlockStyle}"/> <Button x:Uid="GeneralPage_RestartAsAdmin_Button"
Command = "{Binding RestartElevatedButtonEventHandler}"
<TextBlock Text="{Binding Mode=TwoWay, Path=RunningAsText}" IsEnabled="{Binding Mode=TwoWay, Path=IsAdminButtonEnabled}"/>
TextWrapping="Wrap" </controls:Setting.ActionContent>
Margin="{StaticResource SmallTopMargin}"/> </controls:Setting>
</muxc:Expander.Header>
<Button x:Uid="GeneralPage_RestartAsAdmin_Button" <muxc:Expander.Content>
Margin="{StaticResource SmallTopMargin}" <StackPanel Orientation="Vertical">
Command = "{Binding RestartElevatedButtonEventHandler}" <controls:Setting x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{Binding Mode=TwoWay, Path=IsElevated}" Style="{StaticResource ExpanderContentSettingStyle}">
IsEnabled="{Binding Mode=TwoWay, Path=IsAdminButtonEnabled}" <controls:Setting.ActionContent>
/> <ToggleSwitch IsOn="{Binding Mode=TwoWay, Path=RunElevated}"/>
</controls:Setting.ActionContent>
<TextBlock x:Uid="General_RunAsAdminRequired" </controls:Setting>
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}" <muxc:InfoBar x:Uid="General_RunAsAdminRequired"
TextWrapping="Wrap" Severity="Warning"
Visibility="{Binding Mode=TwoWay, Path=IsElevated, Converter={StaticResource BoolToVisibilityConverter}}" IsClosable="False"
Margin="0,24,0,-8" /> IsOpen="True"
Visibility="{Binding Mode=TwoWay, Path=IsElevated, Converter={StaticResource BoolToVisibilityConverter}}"/>
<ToggleSwitch Margin="{StaticResource SmallTopMargin}" <HyperlinkButton NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp"
x:Uid="GeneralSettings_AlwaysRunAsAdminText" Margin="56,0,0,0"
IsEnabled="{Binding Mode=TwoWay, Path=IsElevated}" x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link"/>
IsOn="{Binding Mode=TwoWay, Path=RunElevated}"/> </StackPanel>
</muxc:Expander.Content>
<HyperlinkButton NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" Margin="-12,0,0,0"> </muxc:Expander>
<TextBlock x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link" TextWrapping="Wrap" />
</HyperlinkButton>
<TextBlock
Style="{StaticResource SettingsGroupTitleStyle}"/>
<!-- Replaced the Radiobuttons parent control with a StackPanel to mitigate the Tab and Arrow key related keyboard navigation issues due to XAML Islands
Tracking issue in the winui repository - https://github.com/microsoft/microsoft-ui-xaml/issues/3156 -->
<TextBlock x:Name="RadioButtons_Name_Theme"
Margin="{StaticResource SmallTopMargin}"/>
@@ -105,48 +91,24 @@
<TextBlock x:Uid="General_Updates"
Style="{StaticResource SettingsGroupTitleStyle}"/>
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateUpToDateToVisibilityConverter}}"> <StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateUpToDateToVisibilityConverter}}">
<StackPanel Orientation="Horizontal"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
<TextBlock x:Name="General_Version_UpToDate"
x:Uid="General_Version"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
<TextBlock Text="{Binding PowerToysVersion }"
Margin="4,0,0,0"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" <TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
Margin="{StaticResource SmallTopMargin}" <Run x:Uid="General_Version" />
AutomationProperties.LabeledBy="{Binding ElementName=General_VersionLastChecked}" <Run Text="{Binding PowerToysVersion}"/>
Visibility="{Binding AutoUpdatesEnabled, Converter={StaticResource VisibleIfTrueConverter}}"> </TextBlock>
<TextBlock x:Name="General_VersionLastChecked" <TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
x:Uid="General_VersionLastChecked" <Run x:Uid="General_VersionLastChecked" />
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/> <Run Text="{Binding UpdateCheckedDate, Mode=OneWay}"/>
</TextBlock>
<TextBlock Text="{Binding UpdateCheckedDate, Mode=OneWay}" <TextBlock x:Uid="General_CheckingForUpdates" Margin="{StaticResource SmallTopMargin}" Visibility="{Binding IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"/>
<TextBlock x:Uid="General_UpToDate"
Margin="{StaticResource SmallTopMargin}"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"
Margin="6,0" /> Visibility="{Binding IsNewVersionCheckedAndUpToDate, Converter={StaticResource VisibleIfTrueConverter}}"/>
</StackPanel>
<TextBlock x:Name="General_CheckingForUpdates"
x:Uid="General_CheckingForUpdates"
Margin="{StaticResource SmallTopMargin}"
Visibility="{Binding IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"/>
<TextBlock x:Name="General_UpToDate"
x:Uid="General_UpToDate"
Margin="{StaticResource SmallTopMargin}"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"
Visibility="{Binding IsNewVersionCheckedAndUpToDate, Converter={StaticResource VisibleIfTrueConverter}}"/>
<Button x:Uid="GeneralPage_CheckForUpdates" <Button x:Uid="GeneralPage_CheckForUpdates"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
@@ -155,18 +117,10 @@
/> />
</StackPanel> </StackPanel>
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToDownloadToVisibilityConverter}}">
<StackPanel Orientation="Horizontal"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
<TextBlock x:Name="General_Version_ReadyToDownload"
x:Uid="General_Version"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
<TextBlock Text="{Binding PowerToysVersion }"
Margin="4,0,0,0"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
</StackPanel>
<!-- Read to download and install--><!--
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToDownloadToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" <StackPanel Orientation="Horizontal"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}"> AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
@@ -186,67 +140,48 @@
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
Command="{Binding UpdateNowButtonEventHandler}" Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding IsDownloadAllowed}"/> IsEnabled="{Binding IsDownloadAllowed}"/>
</StackPanel> </StackPanel>-->
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToInstallToVisibilityConverter}}">
<StackPanel Orientation="Horizontal"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
<TextBlock x:Name="General_Version_ReadyToInstall"
x:Uid="General_Version"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
<TextBlock Text="{Binding PowerToysVersion }"
Margin="4,0,0,0"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" <muxc:InfoBar x:Uid="General_NewVersionReadyToInstall" Severity="Success" IsOpen="True" IsClosable="False" Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToDownloadToVisibilityConverter}}">
Margin="{StaticResource SmallTopMargin}" <muxc:InfoBar.ActionButton>
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}"> <Button x:Uid="General_InstallNow"
<TextBlock x:Name="General_NewVersionReadyToInstall"
x:Uid="General_NewVersionReadyToInstall"
Style="{StaticResource SemiBoldBody}"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
<HyperlinkButton NavigateUri="{Binding PowerToysNewAvailableVersionLink}" Content="{Binding PowerToysNewAvailableVersion}" Margin="4,-6,0,0" IsEnabled="{Binding AutoUpdatesEnabled}"/>
</StackPanel>
<Button x:Uid="General_InstallNow"
Margin="{StaticResource SmallTopMargin}"
Command="{Binding UpdateNowButtonEventHandler}" Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding AutoUpdatesEnabled}"/> IsEnabled="{Binding AutoUpdatesEnabled}"/>
</StackPanel> </muxc:InfoBar.ActionButton>
</muxc:InfoBar>
<StackPanel Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateCannotDownloadToVisibilityConverter}}">
<StackPanel Orientation="Horizontal"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
<TextBlock x:Name="General_Version_Error"
x:Uid="General_Version"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
<TextBlock Text="{Binding PowerToysVersion}"
Margin="4,0,0,0"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
</StackPanel>
<StackPanel Orientation="Horizontal"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
<TextBlock x:Name="General_FailedToDownloadTheNewVersion"
x:Uid="General_FailedToDownloadTheNewVersion"
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"/>
<HyperlinkButton NavigateUri="{Binding PowerToysNewAvailableVersionLink}" Content="{Binding PowerToysNewAvailableVersion}" Margin="4,-6,0,0" IsEnabled="{Binding AutoUpdatesEnabled}"/>
</StackPanel>
<TextBlock x:Name="General_Downloading_TryAgain"
<muxc:InfoBar x:Uid="General_NewVersionReadyToInstall" Severity="Success" IsOpen="True" IsClosable="False" Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToInstallToVisibilityConverter}}">
<muxc:InfoBar.ActionButton>
<Button x:Uid="General_InstallNow"
Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding AutoUpdatesEnabled}"/>
</muxc:InfoBar.ActionButton>
</muxc:InfoBar>
<muxc:InfoBar x:Uid="General_FailedToDownloadTheNewVersion" Severity="Warning" IsOpen="True" IsClosable="False" Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateCannotDownloadToVisibilityConverter}}">
<muxc:InfoBar.ActionButton>
<Button x:Uid="General_TryAgainToDownloadAndInstall"
Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding IsDownloadAllowed}"/>
</muxc:InfoBar.ActionButton>
</muxc:InfoBar>
<!--<TextBlock x:Name="General_Downloading_TryAgain"
x:Uid="General_Downloading" x:Uid="General_Downloading"
Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}" Visibility="{Binding Mode=OneWay, Path=IsNewVersionDownloading, Converter={StaticResource VisibleIfTrueConverter}}"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/> Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>-->
<Button x:Uid="General_TryAgainToDownloadAndInstall"
Margin="{StaticResource SmallTopMargin}"
Command="{Binding UpdateNowButtonEventHandler}"
IsEnabled="{Binding IsDownloadAllowed}"/>
</StackPanel>
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates" <ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
Margin="{StaticResource MediumTopMargin}" Margin="{StaticResource MediumTopMargin}"