From 6793f4245ac9c1133bff8c1656be32e2d0b73402 Mon Sep 17 00:00:00 2001 From: U+5BFA Date: Thu, 23 Feb 2023 16:47:19 +0900 Subject: [PATCH 01/36] Redesign Property page --- .../Helpers/FilePropertiesHelpers.cs | 2 +- src/Files.App/Views/Pages/Properties.xaml | 288 +++++++------ src/Files.App/Views/Pages/Properties.xaml.cs | 403 +++++++++++------- .../Pages/PropertiesCustomization.xaml.cs | 2 +- 4 files changed, 405 insertions(+), 290 deletions(-) diff --git a/src/Files.App/Helpers/FilePropertiesHelpers.cs b/src/Files.App/Helpers/FilePropertiesHelpers.cs index d8aae4459b94..57eceeb55e86 100644 --- a/src/Files.App/Helpers/FilePropertiesHelpers.cs +++ b/src/Files.App/Helpers/FilePropertiesHelpers.cs @@ -85,7 +85,7 @@ public static async Task OpenPropertiesWindowAsync(object item, IShellPage assoc appWindow.SetIcon(LogoPath); if (frame.Content is Properties properties) - properties.appWindow = appWindow; + properties.AppWindow = appWindow; appWindow.Show(); diff --git a/src/Files.App/Views/Pages/Properties.xaml b/src/Files.App/Views/Pages/Properties.xaml index 4f0ec4bb9bdd..4254f1d972f4 100644 --- a/src/Files.App/Views/Pages/Properties.xaml +++ b/src/Files.App/Views/Pages/Properties.xaml @@ -4,172 +4,192 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:helpers="using:Files.App.Helpers" + xmlns:local="using:Files.App.Views" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:toolkitconvers="using:CommunityToolkit.WinUI.UI.Converters" + xmlns:uc="using:Files.App.UserControls" d:DesignHeight="700" d:DesignWidth="400" Background="{ThemeResource App.Theme.BackgroundBrush}" KeyDown="Page_KeyDown" - Loaded="Properties_Loaded" - Unloaded="Properties_Unloaded" + Loaded="Page_Loaded" mc:Ignorable="d"> - - - - 40 - 0 - + + - - + + + - - 0 - - + + + 40 + 0 + + + + + + + - + + + + + + + + + + + + + + + + MenuItemsSource="{x:Bind NavViewItems, Mode=TwoWay}" + OpenPaneLength="80" + PaneDisplayMode="Left" + SelectionChanged="NavigationView_SelectionChanged"> + - + 4 + 24 + 2 + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - + - - - - - - + - - - - + - - - - - - - - - - - - - - - - \ No newline at end of file + + + diff --git a/src/Files.App/Views/Pages/PropertiesGeneral.xaml b/src/Files.App/Views/Pages/PropertiesGeneral.xaml index 71bb33b63b8c..bba2e17401b3 100644 --- a/src/Files.App/Views/Pages/PropertiesGeneral.xaml +++ b/src/Files.App/Views/Pages/PropertiesGeneral.xaml @@ -1,22 +1,23 @@ - - + - + + @@ -28,536 +29,544 @@ + + + - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + VerticalAlignment="Center" + Spacing="8"> + + x:Name="itemFilesAndFoldersCountValueTop" + x:Load="{x:Bind ViewModel.FilesAndFoldersCountVisibility, Mode=OneWay}" + Text="{x:Bind ViewModel.FilesAndFoldersCountString, Mode=OneWay}" /> + + + + + + + + + + + + + HorizontalAlignment="Stretch" + ColumnSpacing="8" + RowSpacing="8"> - + + + + + + + + + + + - + + + + + + + + + + + + + + + + Style="{StaticResource PropertyName}" + Text="{helpers:ResourceString Name=UncompressedSize}" + Visibility="{x:Bind ViewModel.IsUncompressedItemSizeVisibile, Mode=OneWay}" /> + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VerticalAlignment="Center" + FontWeight="SemiBold" + Text="{helpers:ResourceString Name=PropertiesDriveUsedSpace/Text}" /> + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + VerticalAlignment="Center" + FontWeight="SemiBold" + Text="{helpers:ResourceString Name=PropertiesDriveFreeSpace/Text}" /> + - - - - - - - + x:Name="driveFreeSpaceValue" + Grid.Row="1" + Grid.Column="2" + x:Load="{x:Bind ViewModel.DriveFreeSpaceVisibility, Mode=OneWay}" + Style="{StaticResource PropertyValueTextBlock}" + Text="{x:Bind ViewModel.DriveFreeSpace, Mode=OneWay}" /> + + + - - - - - - - - - - - - - - - - + - + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - - - - - - - - - + + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" + BorderThickness="1" + CornerRadius="4" + RowSpacing="4"> - - - - - - - - - - - - + Text="{helpers:ResourceString Name=SecurityUsersGroupLabel/Text}" /> - - - + + + + + - - - - + Grid.ColumnSpan="2" + Margin="-12,0" + Background="{ThemeResource CardStrokeColorDefaultBrush}" /> - - - + Grid.ColumnSpan="2" + MaxHeight="160" + Margin="-4,0,-4,0" + HorizontalAlignment="Stretch" + x:Load="{x:Bind SecurityProperties.FilePermissions.CanReadFilePermissions, Mode=OneWay}" + ItemsSource="{x:Bind SecurityProperties.FilePermissions.RulesForUsers, Mode=OneWay}" + SelectedIndex="0" + SelectedItem="{x:Bind SecurityProperties.SelectedRuleForUser, Mode=TwoWay}" + SelectionMode="Single"> + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + TextTrimming="CharacterEllipsis"> + + + - - - + AutomationProperties.Name="{helpers:ResourceString Name=AdvancedPermissions}" + Background="Transparent" + BorderBrush="Transparent" + Command="{x:Bind OpenAdvancedPropertiesCommand}" + ToolTipService.ToolTip="{helpers:ResourceString Name=AdvancedPermissions}"> + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + x:Load="{x:Bind SecurityProperties.FilePermissions.CanReadFilePermissions, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" + Text="{helpers:ResourceString Name=SecurityCannotReadProperties/Text}" + TextWrapping="WrapWholeWords" /> - - - \ No newline at end of file + + diff --git a/src/Files.App/Views/Pages/PropertiesSecurityAdvanced.xaml b/src/Files.App/Views/Pages/PropertiesSecurityAdvanced.xaml index 17e1ee16fb26..aac81ded5931 100644 --- a/src/Files.App/Views/Pages/PropertiesSecurityAdvanced.xaml +++ b/src/Files.App/Views/Pages/PropertiesSecurityAdvanced.xaml @@ -3,15 +3,12 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:behaviors="using:CommunityToolkit.WinUI.UI.Behaviors" - xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:helpers="using:Files.App.Helpers" xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:perm="using:Files.App.Filesystem.Permissions" - d:Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" - d:Height="550" - d:Width="850" + xmlns:toolkitconverters="using:CommunityToolkit.WinUI.UI.Converters" Background="{ThemeResource App.Theme.BackgroundBrush}" KeyDown="Page_KeyDown" Loaded="Properties_Loaded" @@ -20,18 +17,23 @@ + - - + + - + @@ -501,5 +503,6 @@ Click="CancelButton_Click" Content="{helpers:ResourceString Name=Cancel}" /> + - \ No newline at end of file + diff --git a/src/Files.App/Views/Pages/PropertiesShortcut.xaml b/src/Files.App/Views/Pages/PropertiesShortcut.xaml index 086aef17c8b7..a0a1fc20748b 100644 --- a/src/Files.App/Views/Pages/PropertiesShortcut.xaml +++ b/src/Files.App/Views/Pages/PropertiesShortcut.xaml @@ -1,156 +1,165 @@ - - + - + - - - - - - - - - - + + - - + + + + + + + + + - - - + - - - - - - - - - - - + - - - + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + - - - - - \ No newline at end of file + + + From d23be015e1a72a5c410bda185fcfeb97f8642497 Mon Sep 17 00:00:00 2001 From: U+5BFA Date: Fri, 24 Feb 2023 00:09:29 +0900 Subject: [PATCH 05/36] Some fix --- src/Files.App/Views/Pages/Properties.xaml | 2 +- src/Files.App/Views/Pages/Properties.xaml.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Files.App/Views/Pages/Properties.xaml b/src/Files.App/Views/Pages/Properties.xaml index 8d24fea1814e..6c0bb2aeafea 100644 --- a/src/Files.App/Views/Pages/Properties.xaml +++ b/src/Files.App/Views/Pages/Properties.xaml @@ -57,7 +57,7 @@ + Text="Files" /> diff --git a/src/Files.App/Views/Pages/Properties.xaml.cs b/src/Files.App/Views/Pages/Properties.xaml.cs index 2f8ca7598b9d..8d3ba108c25d 100644 --- a/src/Files.App/Views/Pages/Properties.xaml.cs +++ b/src/Files.App/Views/Pages/Properties.xaml.cs @@ -12,11 +12,9 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; -using Microsoft.UI.Xaml.Media.Imaging; using Microsoft.UI.Xaml.Navigation; using System; using System.Collections.ObjectModel; -using System.Linq; using System.Threading; using System.Threading.Tasks; using Windows.Foundation.Metadata; From 1aab0590ca2131a16f0cb1e0602c180035747195 Mon Sep 17 00:00:00 2001 From: U+5BFA Date: Fri, 24 Feb 2023 00:38:53 +0900 Subject: [PATCH 06/36] Some fix 2 --- src/Files.App/Strings/en-US/Resources.resw | 8 +++++++- src/Files.App/Views/Pages/Properties.xaml | 8 +++++--- src/Files.App/Views/Pages/Properties.xaml.cs | 19 ++++++++++--------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 1d229b43c92f..1bb9719cb304 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -2962,7 +2962,7 @@ Toggle full screen - Are you sure you want to delete this tag? + Are you sure you want to delete this tag? Play all @@ -2976,4 +2976,10 @@ Apply this action to all conflicting items + + Apply + + + Save + \ No newline at end of file diff --git a/src/Files.App/Views/Pages/Properties.xaml b/src/Files.App/Views/Pages/Properties.xaml index 6c0bb2aeafea..836cc0b6a96b 100644 --- a/src/Files.App/Views/Pages/Properties.xaml +++ b/src/Files.App/Views/Pages/Properties.xaml @@ -3,6 +3,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:helpers="using:Files.App.Helpers" xmlns:local="using:Files.App.Views" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkitconvers="using:CommunityToolkit.WinUI.UI.Converters" @@ -57,7 +58,8 @@ + Text="{helpers:ResourceString Name=PropertiesTitle}" /> + @@ -170,7 +172,7 @@ MinWidth="100" HorizontalAlignment="Right" Click="ApplyChangesButton_Click" - Content="Apply" /> + Content="{helpers:ResourceString Name=Apply}" />