Skip to content

Added info bar to clarify the risks for the option to set Files as the default file manager #7790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/Files/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,7 @@ We use App Center to track which settings are being used, find bugs, and fix cra
<value>Third party licenses</value>
</data>
<data name="SettingsSetAsDefaultFileManagerDescription" xml:space="preserve">
<value>This setting modifies system files and can have unexpected side effects on your device. The developers take no responsibility in the event an issue occurs as a result. Continuing with this option is an acknowledgment of the risks involved with this action. Please note, uninstalling Files will not undo these changes and may prevent you from opening file explorer unless you turn off this setting before removing Files from your device.</value>
<value>This option modifies the system registry and can have unexpected side effects on your device. Continue at your own risk.</value>
</data>
<data name="ClearAll" xml:space="preserve">
<value>Clear all</value>
Expand Down Expand Up @@ -2720,4 +2720,10 @@ We use App Center to track which settings are being used, find bugs, and fix cra
<data name="RunWithPowerShell" xml:space="preserve">
<value>Run with PowerShell</value>
</data>
<data name="SetFilesAsDefaultWarning" xml:space="preserve">
<value>Do not remove Files from your device without turning off this option. Not doing so will prevent you from opening File Explorer.</value>
</data>
<data name="ShowFolderSizesWarning" xml:space="preserve">
<value>Calculating folder sizes is resource intensive and may cause your CPU usage to increase.</value>
</data>
</root>
32 changes: 29 additions & 3 deletions src/Files/Views/SettingsPages/Experimental.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
xmlns:icore="using:Microsoft.Xaml.Interactions.Core"
xmlns:local="using:Files.UserControls.Settings"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:settingsviewmodels="using:Files.ViewModels.SettingsViewModels"
mc:Ignorable="d">
<Page.Resources>
Expand Down Expand Up @@ -63,11 +64,26 @@
</local:SettingsBlockControl.ExpandableContent>
</local:SettingsBlockControl>

<local:SettingsBlockControl Title="{helpers:ResourceString Name=ShowFolderSize}" HorizontalAlignment="Stretch">
<local:SettingsBlockControl
Title="{helpers:ResourceString Name=ShowFolderSize}"
HorizontalAlignment="Stretch"
IsExpanded="True">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE2B2;" />
</local:SettingsBlockControl.Icon>
<ToggleSwitch IsOn="{Binding ShowFolderSize, Mode=TwoWay}" AutomationProperties.Name="{helpers:ResourceString Name=ShowFolderSize}" Style="{StaticResource RightAlignedToggleSwitchStyle}" />
<ToggleSwitch
AutomationProperties.Name="{helpers:ResourceString Name=ShowFolderSize}"
IsOn="{Binding ShowFolderSize, Mode=TwoWay}"
Style="{StaticResource RightAlignedToggleSwitchStyle}" />
<local:SettingsBlockControl.ExpandableContent>
<muxc:InfoBar
CornerRadius="0,0,2,2"
IsClosable="False"
IsIconVisible="True"
IsOpen="True"
Message="{helpers:ResourceString Name=ShowFolderSizesWarning}"
Severity="Warning" />
</local:SettingsBlockControl.ExpandableContent>
</local:SettingsBlockControl>

<TextBlock
Expand All @@ -79,7 +95,8 @@
<local:SettingsBlockControl
Title="{helpers:ResourceString Name=SettingsSetAsDefaultFileManager}"
HorizontalAlignment="Stretch"
Description="{helpers:ResourceString Name=SettingsSetAsDefaultFileManagerDescription}">
Description="This option modifies the system registry and can have unexpected side effects on your device. Continue at your own risk."
IsExpanded="True">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xEC50;" />
</local:SettingsBlockControl.Icon>
Expand All @@ -93,6 +110,15 @@
</icore:EventTriggerBehavior>
</i:Interaction.Behaviors>
</ToggleSwitch>
<local:SettingsBlockControl.ExpandableContent>
<muxc:InfoBar
CornerRadius="0,0,2,2"
IsClosable="False"
IsIconVisible="True"
IsOpen="True"
Message="{helpers:ResourceString Name=SetFilesAsDefaultWarning}"
Severity="Warning" />
</local:SettingsBlockControl.ExpandableContent>
</local:SettingsBlockControl>

<local:SettingsBlockControl
Expand Down