Skip to content

Commit a71aa81

Browse files
committed
Order
1 parent 1df7332 commit a71aa81

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
368368
ShowItem = !itemsSelected,
369369
ShowInFtpPage = true
370370
},
371-
new ContextMenuFlyoutItemViewModelBuilder(Commands.FormatDrive).Build(),
372371
new ContextMenuFlyoutItemViewModelBuilder(Commands.EmptyRecycleBin)
373372
{
374373
IsVisible = currentInstanceViewModel.IsPageTypeRecycleBin && !itemsSelected,
@@ -600,13 +599,15 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
600599
ItemType = ContextMenuFlyoutItemType.Separator,
601600
ShowItem = (!itemsSelected && Commands.OpenTerminal.IsExecutable) ||
602601
(areAllItemsFolders && Commands.OpenTerminal.IsExecutable) ||
603-
Commands.OpenStorageSense.IsExecutable
602+
Commands.OpenStorageSense.IsExecutable ||
603+
Commands.FormatDrive.IsExecutable
604604
},
605605
new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenTerminal)
606606
{
607607
IsVisible = (!itemsSelected && Commands.OpenTerminal.IsExecutable) || (areAllItemsFolders && Commands.OpenTerminal.IsExecutable)
608608
}.Build(),
609609
new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenStorageSense).Build(),
610+
new ContextMenuFlyoutItemViewModelBuilder(Commands.FormatDrive).Build(),
610611
// Shell extensions are not available on the FTP server or in the archive,
611612
// but following items are intentionally added because icons in the context menu will not appear
612613
// unless there is at least one menu item with an icon that is not an ThemedIconModel. (#12943)

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@
12481248
<value>Open the Storage Sense page in Windows Settings</value>
12491249
</data>
12501250
<data name="Cleanup" xml:space="preserve">
1251-
<value>Cleanup</value>
1251+
<value>Cleanup...</value>
12521252
</data>
12531253
<data name="Copy" xml:space="preserve">
12541254
<value>Copy</value>

src/Files.App/ViewModels/UserControls/SidebarViewModel.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,13 +1043,6 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
10431043
ShowItem = options.ShowEjectDevice
10441044
},
10451045
new ContextMenuFlyoutItemViewModel()
1046-
{
1047-
Text = "FormatDriveText".GetLocalizedResource(),
1048-
Command = FormatDriveCommand,
1049-
CommandParameter = item,
1050-
ShowItem = options.ShowFormatDrive
1051-
},
1052-
new ContextMenuFlyoutItemViewModel()
10531046
{
10541047
Text = "Properties".GetLocalizedResource(),
10551048
ThemedIconModel = new ThemedIconModel()
@@ -1063,11 +1056,20 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
10631056
new ContextMenuFlyoutItemViewModel()
10641057
{
10651058
ItemType = ContextMenuFlyoutItemType.Separator,
1066-
ShowItem = Commands.OpenTerminalFromSidebar.IsExecutable || Commands.OpenStorageSenseFromSidebar.IsExecutable
1059+
ShowItem = Commands.OpenTerminalFromSidebar.IsExecutable ||
1060+
Commands.OpenStorageSenseFromSidebar.IsExecutable ||
1061+
options.ShowFormatDrive
10671062
},
10681063
new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenTerminalFromSidebar).Build(),
10691064
new ContextMenuFlyoutItemViewModelBuilder(Commands.OpenStorageSenseFromSidebar).Build(),
10701065
new ContextMenuFlyoutItemViewModel()
1066+
{
1067+
Text = Strings.FormatDriveText.GetLocalizedResource(),
1068+
Command = FormatDriveCommand,
1069+
CommandParameter = item,
1070+
ShowItem = options.ShowFormatDrive
1071+
},
1072+
new ContextMenuFlyoutItemViewModel()
10711073
{
10721074
ItemType = ContextMenuFlyoutItemType.Separator,
10731075
Tag = "OverflowSeparator",

src/Files.App/ViewModels/UserControls/Widgets/DrivesWidgetViewModel.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,6 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
121121
ShowItem = options?.ShowEjectDevice ?? false
122122
},
123123
new()
124-
{
125-
Text = "FormatDriveText".GetLocalizedResource(),
126-
Command = FormatDriveCommand,
127-
CommandParameter = item,
128-
ShowItem = options?.ShowFormatDrive ?? false
129-
},
130-
new()
131124
{
132125
Text = "Properties".GetLocalizedResource(),
133126
ThemedIconModel = new ThemedIconModel() { ThemedIconStyle = "App.ThemedIcons.Properties" },
@@ -149,11 +142,20 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
149142
new ContextMenuFlyoutItemViewModel()
150143
{
151144
ItemType = ContextMenuFlyoutItemType.Separator,
152-
ShowItem = CommandManager.OpenTerminalFromHome.IsExecutable || CommandManager.OpenStorageSenseFromHome.IsExecutable
145+
ShowItem = CommandManager.OpenTerminalFromHome.IsExecutable ||
146+
CommandManager.OpenStorageSenseFromHome.IsExecutable ||
147+
(options?.ShowFormatDrive ?? false)
153148
},
154149
new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenTerminalFromHome).Build(),
155150
new ContextMenuFlyoutItemViewModelBuilder(CommandManager.OpenStorageSenseFromHome).Build(),
156151
new()
152+
{
153+
Text = "FormatDriveText".GetLocalizedResource(),
154+
Command = FormatDriveCommand,
155+
CommandParameter = item,
156+
ShowItem = options?.ShowFormatDrive ?? false
157+
},
158+
new()
157159
{
158160
ItemType = ContextMenuFlyoutItemType.Separator,
159161
Tag = "OverflowSeparator",

0 commit comments

Comments
 (0)