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">
<value>On</value>
</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>
</data>
<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">
<value>GitHub repository</value>
</data>
<data name="General_Updates.Text" xml:space="preserve">
<data name="General_Updates.Header" xml:space="preserve">
<value>Updates</value>
</data>
<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">
<value>Version</value>
</data>
<data name="Admin_mode.Text" xml:space="preserve">
<data name="Admin_mode.Header" xml:space="preserve">
<value>Administrator mode</value>
</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>
</data>
<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">
<value>You can always change modes quickly by {right-clicking the Awake icon} in the system tray.</value>
</data>
<data name="General_FailedToDownloadTheNewVersion.Text" xml:space="preserve">
<value>* An error occurred trying to update to</value>
<data name="General_FailedToDownloadTheNewVersion.Message" xml:space="preserve">
<value>An error occurred trying to install this update</value>
</data>
<data name="General_InstallNow.Content" xml:space="preserve">
<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">
<value>Try again to download and install</value>
</data>
<data name="General_CheckingForUpdates.Text" xml:space="preserve">
<data name="General_CheckingForUpdates.Message" xml:space="preserve">
<value>Checking for updates...</value>
</data>
<data name="General_NewVersionReadyToInstall.Text" xml:space="preserve">
<value>A new version is ready to install:</value>
<data name="General_NewVersionReadyToInstall.Message" xml:space="preserve">
<value>A new version is ready to install</value>
</data>
<data name="General_UpToDate.Text" xml:space="preserve">
<data name="General_UpToDate.Message" xml:space="preserve">
<value>PowerToys is up to date</value>
</data>
<data name="General_DownloadAndInstall.Content" xml:space="preserve">

View File

@@ -26,51 +26,37 @@
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<TextBlock x:Uid="Admin_Mode"
FontWeight="SemiBold"
TextWrapping="Wrap"
AutomationProperties.HeadingLevel="Level2"
Style="{StaticResource SubtitleTextBlockStyle}"/>
<TextBlock Text="{Binding Mode=TwoWay, Path=RunningAsText}"
TextWrapping="Wrap"
Margin="{StaticResource SmallTopMargin}"/>
<Button x:Uid="GeneralPage_RestartAsAdmin_Button"
Margin="{StaticResource SmallTopMargin}"
Command = "{Binding RestartElevatedButtonEventHandler}"
IsEnabled="{Binding Mode=TwoWay, Path=IsAdminButtonEnabled}"
/>
<TextBlock x:Uid="General_RunAsAdminRequired"
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"
TextWrapping="Wrap"
Visibility="{Binding Mode=TwoWay, Path=IsElevated, Converter={StaticResource BoolToVisibilityConverter}}"
Margin="0,24,0,-8" />
<ToggleSwitch Margin="{StaticResource SmallTopMargin}"
x:Uid="GeneralSettings_AlwaysRunAsAdminText"
IsEnabled="{Binding Mode=TwoWay, Path=IsElevated}"
IsOn="{Binding Mode=TwoWay, Path=RunElevated}"/>
<HyperlinkButton NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp" Margin="-12,0,0,0">
<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}"/>
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander.Header>
<controls:Setting x:Uid="Admin_Mode" Icon="&#xE1A7;" Description="{Binding Mode=TwoWay, Path=RunningAsText}" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.ActionContent>
<Button x:Uid="GeneralPage_RestartAsAdmin_Button"
Command = "{Binding RestartElevatedButtonEventHandler}"
IsEnabled="{Binding Mode=TwoWay, Path=IsAdminButtonEnabled}"/>
</controls:Setting.ActionContent>
</controls:Setting>
</muxc:Expander.Header>
<muxc:Expander.Content>
<StackPanel Orientation="Vertical">
<controls:Setting x:Uid="GeneralSettings_AlwaysRunAsAdminText" IsEnabled="{Binding Mode=TwoWay, Path=IsElevated}" Style="{StaticResource ExpanderContentSettingStyle}">
<controls:Setting.ActionContent>
<ToggleSwitch IsOn="{Binding Mode=TwoWay, Path=RunElevated}"/>
</controls:Setting.ActionContent>
</controls:Setting>
<muxc:InfoBar x:Uid="General_RunAsAdminRequired"
Severity="Warning"
IsClosable="False"
IsOpen="True"
Visibility="{Binding Mode=TwoWay, Path=IsElevated, Converter={StaticResource BoolToVisibilityConverter}}"/>
<HyperlinkButton NavigateUri="https://aka.ms/powertoysDetectedElevatedHelp"
Margin="56,0,0,0"
x:Uid="GeneralPage_ToggleSwitch_AlwaysRunElevated_Link"/>
</StackPanel>
</muxc:Expander.Content>
</muxc:Expander>
<toolkitcontrols:HeaderedItemsControl IsEnabled="True" x:Uid="ShortcutGuide_Appearance_Behavior">
@@ -105,48 +91,24 @@
<TextBlock x:Uid="General_Updates"
Style="{StaticResource SettingsGroupTitleStyle}"/>
<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"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_VersionLastChecked}"
Visibility="{Binding AutoUpdatesEnabled, Converter={StaticResource VisibleIfTrueConverter}}">
<TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
<Run x:Uid="General_Version" />
<Run Text="{Binding PowerToysVersion}"/>
</TextBlock>
<TextBlock x:Name="General_VersionLastChecked"
x:Uid="General_VersionLastChecked"
Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
<TextBlock Margin="{StaticResource SmallTopMargin}" Opacity="{Binding AutoUpdatesEnabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}">
<Run x:Uid="General_VersionLastChecked" />
<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}}"
Margin="6,0" />
</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}}"/>
Visibility="{Binding IsNewVersionCheckedAndUpToDate, Converter={StaticResource VisibleIfTrueConverter}}"/>
<Button x:Uid="GeneralPage_CheckForUpdates"
Margin="{StaticResource SmallTopMargin}"
@@ -155,18 +117,10 @@
/>
</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"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
@@ -186,67 +140,48 @@
Margin="{StaticResource SmallTopMargin}"
Command="{Binding UpdateNowButtonEventHandler}"
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"
Margin="{StaticResource SmallTopMargin}"
AutomationProperties.LabeledBy="{Binding ElementName=General_Version}">
<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}"
<muxc:InfoBar x:Uid="General_NewVersionReadyToInstall" Severity="Success" IsOpen="True" IsClosable="False" Visibility="{Binding PowerToysUpdatingState, Converter={StaticResource UpdatingStateReadyToDownloadToVisibilityConverter}}">
<muxc:InfoBar.ActionButton>
<Button x:Uid="General_InstallNow"
Command="{Binding UpdateNowButtonEventHandler}"
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"
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"
Margin="{StaticResource MediumTopMargin}"