diff --git a/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs b/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs index 3c2a88ffcc26..1c9c966d81e8 100644 --- a/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallCertificateAction.cs @@ -10,7 +10,7 @@ internal sealed partial class InstallCertificateAction : ObservableObject, IActi private readonly IContentPageContext context; public string Label - => Strings.Install.GetLocalizedResource(); + => Strings.InstallCertificate.GetLocalizedResource(); public string Description => Strings.InstallCertificateDescription.GetLocalizedFormatResource(context.SelectedItems.Count); diff --git a/src/Files.App/Actions/Content/Install/InstallFontAction.cs b/src/Files.App/Actions/Content/Install/InstallFontAction.cs index 6571fd0309e5..8e5dfd453481 100644 --- a/src/Files.App/Actions/Content/Install/InstallFontAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallFontAction.cs @@ -11,7 +11,7 @@ internal sealed partial class InstallFontAction : ObservableObject, IAction private static readonly StatusCenterViewModel StatusCenterViewModel = Ioc.Default.GetRequiredService(); public string Label - => Strings.Install.GetLocalizedResource(); + => Strings.InstallFont.GetLocalizedResource(); public string Description => Strings.InstallFontDescription.GetLocalizedFormatResource(context.SelectedItems.Count); diff --git a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs index 8ebc5e5ab2d3..ac9bebad3c74 100644 --- a/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs +++ b/src/Files.App/Actions/Content/Install/InstallInfDriverAction.cs @@ -10,7 +10,7 @@ internal sealed partial class InstallInfDriverAction : ObservableObject, IAction private readonly IContentPageContext context; public string Label - => Strings.Install.GetLocalizedResource(); + => Strings.InstallDriver.GetLocalizedResource(); public string Description => Strings.InstallInfDriverDescription.GetLocalizedFormatResource(context.SelectedItems.Count); diff --git a/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs b/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs index 0a5bf12f61ac..722ba833d745 100644 --- a/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs +++ b/src/Files.App/Actions/FileSystem/CopyItemPathAction.cs @@ -10,7 +10,7 @@ internal sealed class CopyItemPathAction : IAction private readonly IContentPageContext context; public string Label - => Strings.CopyPath.GetLocalizedResource(); + => Strings.CopyItemPath.GetLocalizedResource(); public string Description => Strings.CopyItemPathDescription.GetLocalizedResource(); diff --git a/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs b/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs index bdcdfb39e3cd..c37664b9733a 100644 --- a/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs +++ b/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs @@ -8,7 +8,7 @@ internal sealed partial class PasteItemToSelectionAction : BaseUIAction, IAction private readonly IContentPageContext context; public string Label - => Strings.Paste.GetLocalizedResource(); + => Strings.PasteToSelectedFolder.GetLocalizedResource(); public string Description => Strings.PasteItemToSelectionDescription.GetLocalizedResource(); diff --git a/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs b/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs index 43db08ca078e..3aea4b3c8351 100644 --- a/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs +++ b/src/Files.App/Actions/Show/ToggleShowHiddenItemsAction.cs @@ -8,7 +8,7 @@ internal sealed partial class ToggleShowHiddenItemsAction : ObservableObject, IT private readonly IFoldersSettingsService settings; public string Label - => Strings.ShowHiddenItems.GetLocalizedResource(); + => Strings.HiddenItems.GetLocalizedResource(); public string Description => Strings.ToggleShowHiddenItemsDescription.GetLocalizedResource(); diff --git a/src/Files.App/Actions/Show/ToggleToolbarAction.cs b/src/Files.App/Actions/Show/ToggleToolbarAction.cs index ba04e0c49b3e..b7cab99b8ba6 100644 --- a/src/Files.App/Actions/Show/ToggleToolbarAction.cs +++ b/src/Files.App/Actions/Show/ToggleToolbarAction.cs @@ -11,7 +11,7 @@ public string Label => Strings.ToggleToolbar.GetLocalizedResource(); public string Description - => Strings.ToggleToolbar.GetLocalizedResource(); + => Strings.ToggleToolbarDescription.GetLocalizedResource(); public HotKey HotKey => new(Keys.B, KeyModifiers.CtrlShift); diff --git a/src/Files.App/Dialogs/SettingsDialog.xaml.cs b/src/Files.App/Dialogs/SettingsDialog.xaml.cs index 0147a2533344..27ba9a61b38a 100644 --- a/src/Files.App/Dialogs/SettingsDialog.xaml.cs +++ b/src/Files.App/Dialogs/SettingsDialog.xaml.cs @@ -50,7 +50,13 @@ private void UpdateDialogLayout() { ContainerGrid.Height = MainWindow.Instance.Bounds.Height <= 760 ? MainWindow.Instance.Bounds.Height - 70 : 690; ContainerGrid.Width = MainWindow.Instance.Bounds.Width <= 1100 ? MainWindow.Instance.Bounds.Width : 1100; - MainSettingsNavigationView.PaneDisplayMode = MainWindow.Instance.Bounds.Width < 700 ? NavigationViewPaneDisplayMode.LeftCompact : NavigationViewPaneDisplayMode.Left; + + var paneDisplayMode = MainWindow.Instance.Bounds.Width < 700 + ? NavigationViewPaneDisplayMode.LeftCompact + : NavigationViewPaneDisplayMode.Left; + + if (MainSettingsNavigationView.PaneDisplayMode != paneDisplayMode) + MainSettingsNavigationView.PaneDisplayMode = paneDisplayMode; } private void MainSettingsNavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 8a7c438f3b24..4c2cfec9f4cf 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -123,6 +123,9 @@ Copy path + + Copy item path + Copy path with quotes @@ -163,7 +166,7 @@ Skip - Select All + Select all Invert selection @@ -214,7 +217,7 @@ Show hidden files and folders - Show dot files + Dot files Appearance @@ -1089,7 +1092,10 @@ Toggle the info pane to view the detail/preview panes - Toggle the Toolbar + Toggle toolbar + + + Toggle visibility of the toolbar No preview available @@ -1392,7 +1398,7 @@ {0} items - Reopen closed tab + Reopen tab Rename @@ -1599,7 +1605,7 @@ Replace all child object permissions entries with inheritable permission entries from this object - Close active pane + Close pane Enter compact overlay @@ -2289,10 +2295,7 @@ Context menu options - Show file extensions - - - Show hidden items + File extensions Format @@ -2301,13 +2304,13 @@ Help - Toggle full screen + Full screen Are you sure you want to delete this tag? - Play all + Play Height @@ -2367,7 +2370,7 @@ Increase size - Toggle sort direction + Sort direction Invalid name @@ -2379,37 +2382,37 @@ Videos - Launch preview popup + Preview popup Toggle compact overlay - Open online help page in browser + Open the online help page in your browser - Toggle full screen + Toggle full screen mode - Enter compact overlay + Enter compact overlay mode - Exit compact overlay + Exit compact overlay mode - Toggle compact overlay + Toggle compact overlay mode - Go to search box + Start search in the OmniBar - Toggle whether to show hidden items + Toggle visibility of hidden items - Toggle whether to show dot files + Toggle visibility of dot files - Toggle whether to show file extensions + Toggle visibility of file extensions Toggle the preview pane to view file previews @@ -2418,7 +2421,7 @@ Toggle whether to show sidebar - Copy {0, plural, one {item} other {items}} to clipboard + Copy selected {0, plural, one {item} other {items}} to clipboard Copy path of the current directory to the clipboard @@ -2433,19 +2436,22 @@ Copy path of the current directory with quotes to the clipboard - Cut {0, plural, one {item} other {items}} to clipboard + Cut selected {0, plural, one {item} other {items}} to clipboard - Paste items from clipboard to current folder + Paste clipboard items to the current folder - Paste items from clipboard to current folder as shortcuts + Paste clipboard items to the current folder as shortcuts - Paste items from clipboard to selected folder + Paste clipboard items to the selected folder + + + Paste to selected folder - Delete {0, plural, one {item} other {items}} + Delete selected {0, plural, one {item} other {items}} Create new folder @@ -2457,7 +2463,7 @@ Create new shortcut to any item - Empty recycle bin + Empty the contents of Recycle Bin Open "Format Drive" menu for selected item @@ -2487,10 +2493,10 @@ Select all items - Invert item selection + Invert selected items - Clear item selection + Clear selected items Toggle item selection @@ -2522,6 +2528,15 @@ Set selected picture as the app background + + Install font + + + Install driver + + + Install certificate + Install selected {0, plural, one {font} other {fonts}} @@ -2685,13 +2700,13 @@ Toggle group sort direction - Open new tab + Open a new tab - Navigate backward in navigation history + Navigate backward - Navigate forward in navigation history + Navigate forward Navigate up one directory @@ -2724,7 +2739,7 @@ Close all tabs including the current tab - Reopen last closed tab + Reopen recently closed tab Move to the previous tab @@ -2736,13 +2751,13 @@ Close current tab - Close active pane + Close the active pane Focus other pane - Switch focus to the non active pane + Switch focus to the other pane Toggle the sidebar @@ -2950,13 +2965,13 @@ Untagged - Moves to the previous tab + Previous tab - Moves to the next tab + Next tab - Closes current tab + Close tab Edit path @@ -2986,7 +3001,7 @@ Show checkboxes when selecting items - Focus path bar + Edit path in the OmniBar Create new item @@ -3001,7 +3016,7 @@ Delete permanently - Delete {0, plural, one {item} other {items}} permanently + Delete selected {0, plural, one {item} other {items}} permanently Play the selected media files @@ -3121,7 +3136,7 @@ Create a folder with the currently selected {0, plural, one {item} other {items}} - Open properties + Properties Open File Explorer properties @@ -3266,7 +3281,7 @@ Initialize repo - Initialize a Git repository + Initialize current folder as a git repository Remote Repository Name @@ -3281,13 +3296,13 @@ Sort items by path - Open directory in new pane + Open selected directory in a new pane - Open directory in new tab + Open selected directory in a new tab - Open directory in new window + Open selected directory in a new window Open all @@ -3312,10 +3327,10 @@ The '{0}' command is not ready to be executed. - Command palette + Command Palette - Open command palette + Open Command Palette in the OmniBar Start in: @@ -3740,7 +3755,7 @@ Sort files and folders together - Sort files and folders together + Sort files and folders in the same list Sort files first @@ -4001,16 +4016,16 @@ Tab actions menu - Add vertical pane + Vertical pane - Add a vertical pane + Add vertical pane - Add horizontal pane + Horizontal pane - Add a horizontal pane + Add horizontal pane Arrange vertically @@ -4103,10 +4118,10 @@ Always switch focus to newly created tab - Toggle the shelf pane + Toggle shelf pane - Toggle the shelf pane visibility + Toggle the visibility of the shelf pane Show shelf pane toggle in address bar diff --git a/src/Files.App/ViewModels/Settings/ActionsViewModel.cs b/src/Files.App/ViewModels/Settings/ActionsViewModel.cs index 79ea48f92883..5d9142b58d1d 100644 --- a/src/Files.App/ViewModels/Settings/ActionsViewModel.cs +++ b/src/Files.App/ViewModels/Settings/ActionsViewModel.cs @@ -20,6 +20,13 @@ public sealed partial class ActionsViewModel : ObservableObject public ObservableCollection ValidActionItems { get; } = []; public ObservableCollection AllActionItems { get; } = []; + private ObservableCollection _FilteredActionItems; + public ObservableCollection FilteredActionItems + { + get { return _FilteredActionItems; } + set { SetProperty(ref _FilteredActionItems, value); } + } + private bool _IsResetAllConfirmationTeachingTipOpened; public bool IsResetAllConfirmationTeachingTipOpened { @@ -148,6 +155,8 @@ await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(() => } } }); + + FilteredActionItems = new ObservableCollection(ValidActionItems); } private void ExecuteShowAddNewKeyBindingBlockCommand() @@ -432,5 +441,21 @@ ActionsSettingsService.ActionsV2 is not null item.IsInEditMode = false; ValidActionItems.Remove(item); } + + public void FilterItems(string query) + { + if (string.IsNullOrEmpty(query)) + { + FilteredActionItems = new ObservableCollection(ValidActionItems); + } + else + { + FilteredActionItems = new ObservableCollection( + ValidActionItems.Where(item => + item.CommandLabel.Contains(query, StringComparison.OrdinalIgnoreCase) || + item.CommandDescription.Contains(query, StringComparison.OrdinalIgnoreCase)) + ); + } + } } } diff --git a/src/Files.App/Views/Settings/ActionsPage.xaml b/src/Files.App/Views/Settings/ActionsPage.xaml index e825bc04a3de..e98f7af609d7 100644 --- a/src/Files.App/Views/Settings/ActionsPage.xaml +++ b/src/Files.App/Views/Settings/ActionsPage.xaml @@ -9,6 +9,7 @@ xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:keyboard="using:Files.App.UserControls.KeyboardShortcut" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:uc="using:Files.App.UserControls" xmlns:wctconverters="using:CommunityToolkit.WinUI.Converters" x:Name="PageRoot" DataContext="{x:Bind ViewModel, Mode=OneWay}" @@ -69,13 +70,18 @@ Text="{helpers:ResourceString Name=Actions}" /> - + + + + + + - -