Skip to content

Commit a115149

Browse files
committed
Populate the new breadcrumbbar
1 parent 67b74b8 commit a115149

File tree

4 files changed

+66
-53
lines changed

4 files changed

+66
-53
lines changed

src/Files.App.Controls/Omnibar/Omnibar.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
Height="{TemplateBinding Height}"
134134
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
135135
Background="{TemplateBinding Background}"
136-
CornerRadius="{TemplateBinding CornerRadius}"
137136
TabFocusNavigation="Local">
138137
<!-- Mode Button -->
139138
<Border
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (c) Files Community
2+
// Licensed under the MIT License.
3+
4+
namespace Files.App.Data.Models
5+
{
6+
internal record BreadcrumbBarItemModel(string Text);
7+
}

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

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,9 +2138,6 @@
21382138
<data name="SplittingSize" xml:space="preserve">
21392139
<value>Splitting size</value>
21402140
</data>
2141-
<data name="DoNotSplit" xml:space="preserve">
2142-
<value>Do not split</value>
2143-
</data>
21442141
<data name="CD" xml:space="preserve">
21452142
<value>CD</value>
21462143
</data>
@@ -2195,15 +2192,6 @@
21952192
<data name="EditSettingsFile" xml:space="preserve">
21962193
<value>Edit settings file</value>
21972194
</data>
2198-
<data name="EditSettingsFileDescription" xml:space="preserve">
2199-
<value>Open settings file in your default editor</value>
2200-
</data>
2201-
<data name="ReleaseNotes" xml:space="preserve">
2202-
<value>Release Notes</value>
2203-
</data>
2204-
<data name="ReleaseNotesDescription" xml:space="preserve">
2205-
<value>Open Release Notes</value>
2206-
</data>
22072195
<data name="CannotCreateShortcutDialogTitle" xml:space="preserve">
22082196
<value>Creating a shortcut in this location requires administrator privileges</value>
22092197
</data>
@@ -3505,7 +3493,7 @@
35053493
<data name="StatusCenter_GitCloneInProgress_SubHeader" xml:space="preserve">
35063494
<value>Cloning {0} from "{1}" to "{2}"</value>
35073495
<comment>Shown in a StatusCenter card.</comment>
3508-
</data>
3496+
</data>
35093497
<data name="StatusCenter_InstallFontCanceled_Header" xml:space="preserve">
35103498
<value>Canceled installing {0} fonts</value>
35113499
<comment>Shown in a StatusCenter card.</comment>
@@ -3537,7 +3525,7 @@
35373525
<data name="StatusCenter_InstallFontInProgress_SubHeader" xml:space="preserve">
35383526
<value>Installing {0} font(s) from "{1}"</value>
35393527
<comment>Shown in a StatusCenter card.</comment>
3540-
</data>
3528+
</data>
35413529
<data name="StatusCenter_CopyCanceled_Header" xml:space="preserve">
35423530
<value>Canceled copying {0} item(s) to "{1}"</value>
35433531
<comment>Shown in a StatusCenter card.</comment>
@@ -3697,9 +3685,6 @@
36973685
<data name="FailedToSetBackground" xml:space="preserve">
36983686
<value>Failed to set the background wallpaper</value>
36993687
</data>
3700-
<data name="FailedToOpenSettingsFile" xml:space="preserve">
3701-
<value>Failed to open the settings file</value>
3702-
</data>
37033688
<data name="GitDeleteBranch" xml:space="preserve">
37043689
<value>Delete Git branch</value>
37053690
</data>
@@ -4119,18 +4104,6 @@
41194104
<value>Add to shelf</value>
41204105
<comment>Tooltip that displays when dragging items to the Shelf Pane</comment>
41214106
</data>
4122-
<data name="EnterHashToCompare" xml:space="preserve">
4123-
<value>Enter a hash to compare</value>
4124-
<comment>Placeholder that appears in the compare hash text box</comment>
4125-
</data>
4126-
<data name="HashesMatch" xml:space="preserve">
4127-
<value>Matches {0}</value>
4128-
<comment>Appears when two compared hashes match, e.g. "Matches SHA256"</comment>
4129-
</data>
4130-
<data name="HashesDoNotMatch" xml:space="preserve">
4131-
<value>No matches found</value>
4132-
<comment>Appears when two compared hashes don't match</comment>
4133-
</data>
41344107
<data name="PathOrAlias" xml:space="preserve">
41354108
<value>Path or alias</value>
41364109
</data>
@@ -4174,6 +4147,33 @@
41744147
<value>Cannot clone repo</value>
41754148
<comment>Cannot clone repo dialog title</comment>
41764149
</data>
4150+
<data name="DoNotSplit" xml:space="preserve">
4151+
<value>Do not split</value>
4152+
</data>
4153+
<data name="EditSettingsFileDescription" xml:space="preserve">
4154+
<value>Open settings file in your default editor</value>
4155+
</data>
4156+
<data name="ReleaseNotes" xml:space="preserve">
4157+
<value>Release Notes</value>
4158+
</data>
4159+
<data name="ReleaseNotesDescription" xml:space="preserve">
4160+
<value>Open Release Notes</value>
4161+
</data>
4162+
<data name="FailedToOpenSettingsFile" xml:space="preserve">
4163+
<value>Failed to open the settings file</value>
4164+
</data>
4165+
<data name="EnterHashToCompare" xml:space="preserve">
4166+
<value>Enter a hash to compare</value>
4167+
<comment>Placeholder that appears in the compare hash text box</comment>
4168+
</data>
4169+
<data name="HashesMatch" xml:space="preserve">
4170+
<value>Matches {0}</value>
4171+
<comment>Appears when two compared hashes match, e.g. "Matches SHA256"</comment>
4172+
</data>
4173+
<data name="HashesDoNotMatch" xml:space="preserve">
4174+
<value>No matches found</value>
4175+
<comment>Appears when two compared hashes don't match</comment>
4176+
</data>
41774177
<data name="CompareFile" xml:space="preserve">
41784178
<value>Compare a file</value>
41794179
<comment>Button that appears in file hash properties that allows the user to compare two files</comment>
@@ -4190,4 +4190,7 @@
41904190
<data name="EnableOmnibar" xml:space="preserve">
41914191
<value>Enable Omnibar</value>
41924192
</data>
4193+
<data name="OmnibarPathModeTextPlaceholder" xml:space="preserve">
4194+
<value>Enter a path to navigate to...</value>
4195+
</data>
41934196
</root>

src/Files.App/UserControls/NavigationToolbar.xaml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
xmlns:converters="using:Files.App.Converters"
1010
xmlns:converters1="using:CommunityToolkit.WinUI.Converters"
1111
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
12+
xmlns:dataitems="using:Files.App.Data.Items"
1213
xmlns:helpers="using:Files.App.Helpers"
1314
xmlns:items="using:Files.App.Data.Items"
1415
xmlns:keyboard="using:Files.App.UserControls.KeyboardShortcut"
@@ -211,6 +212,7 @@
211212
<Grid.ColumnDefinitions>
212213
<ColumnDefinition Width="*" />
213214
<ColumnDefinition Width="Auto" />
215+
<ColumnDefinition Width="Auto" />
214216
</Grid.ColumnDefinitions>
215217
<!-- Path Box -->
216218
<AutoSuggestBox
@@ -314,6 +316,22 @@
314316
LostFocus="SearchRegion_LostFocus"
315317
SearchBoxViewModel="{x:Bind ViewModel.SearchBoxViewModel, Mode=OneWay}"
316318
Visibility="{x:Bind converters:MultiBooleanConverter.OrConvertToVisibility(ShowSearchBox, ViewModel.IsSearchBoxVisible), Mode=OneWay}" />
319+
320+
<!-- Mini Search Button -->
321+
<Button
322+
x:Name="ShowSearchButton"
323+
Grid.Column="2"
324+
AccessKey="I"
325+
AccessKeyInvoked="Button_AccessKeyInvoked"
326+
AutomationProperties.Name="{x:Bind Commands.Search.Label, Mode=OneWay}"
327+
Command="{x:Bind Commands.Search, Mode=OneWay}"
328+
IsEnabled="{x:Bind Commands.Search.IsExecutable, Mode=OneWay}"
329+
Style="{StaticResource AddressToolbarButtonStyle}"
330+
ToolTipService.ToolTip="{x:Bind Commands.Search.LabelWithHotKey, Mode=OneWay}"
331+
Visibility="Collapsed">
332+
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.SearchButtonGlyph, Mode=OneWay}" />
333+
</Button>
334+
317335
</Grid>
318336

319337
<!-- Omnibar -->
@@ -326,24 +344,24 @@
326344
IconOnActive="{controls:ThemedIconMarkup Style={StaticResource App.ThemedIcons.Omnibar.Path}, IsFilled=True}"
327345
IconOnInactive="{controls:ThemedIconMarkup Style={StaticResource App.ThemedIcons.Omnibar.Path}, IconType=Outline}"
328346
IsDefault="True"
329-
ModeName="Path"
330-
PlaceholderText="Enter text..."
331-
Text="Path...">
332-
<!--<controls:OmnibarMode.ContentOnInactive>
333-
<controls:BreadcrumbBar x:Name="NewBreadcrumbBar">
347+
ModeName="{helpers:ResourceString Name=Path}"
348+
PlaceholderText="{helpers:ResourceString Name=OmnibarPathModeTextPlaceholder}"
349+
Text="{x:Bind ViewModel.PathText, Mode=OneWay}">
350+
<controls:OmnibarMode.ContentOnInactive>
351+
<controls:BreadcrumbBar x:Name="NewBreadcrumbBar" ItemsSource="{x:Bind ViewModel.PathComponents, Mode=OneWay}">
334352
<controls:BreadcrumbBar.RootItem>
335353
<Image
336354
Width="16"
337355
Height="16"
338-
Source="/Data/DummyIcon1.png" />
356+
Source="/Assets/FluentIcons/Home.png" />
339357
</controls:BreadcrumbBar.RootItem>
340358
<controls:BreadcrumbBar.ItemTemplate>
341-
<DataTemplate x:DataType="data:BreadcrumbBarItemModel">
342-
<controls:BreadcrumbBarItem Content="{x:Bind Text}" />
359+
<DataTemplate x:DataType="dataitems:PathBoxItem">
360+
<controls:BreadcrumbBarItem Content="{x:Bind Title, Mode=OneWay}" />
343361
</DataTemplate>
344362
</controls:BreadcrumbBar.ItemTemplate>
345363
</controls:BreadcrumbBar>
346-
</controls:OmnibarMode.ContentOnInactive>-->
364+
</controls:OmnibarMode.ContentOnInactive>
347365
</controls:OmnibarMode>
348366

349367
<controls:OmnibarMode
@@ -402,20 +420,6 @@
402420
Orientation="Horizontal"
403421
Spacing="4">
404422

405-
<!-- Mini Search Button -->
406-
<Button
407-
x:Name="ShowSearchButton"
408-
AccessKey="I"
409-
AccessKeyInvoked="Button_AccessKeyInvoked"
410-
AutomationProperties.Name="{x:Bind Commands.Search.Label, Mode=OneWay}"
411-
Command="{x:Bind Commands.Search, Mode=OneWay}"
412-
IsEnabled="{x:Bind Commands.Search.IsExecutable, Mode=OneWay}"
413-
Style="{StaticResource AddressToolbarButtonStyle}"
414-
ToolTipService.ToolTip="{x:Bind Commands.Search.LabelWithHotKey, Mode=OneWay}"
415-
Visibility="Collapsed">
416-
<FontIcon FontSize="14" Glyph="{x:Bind ViewModel.SearchButtonGlyph, Mode=OneWay}" />
417-
</Button>
418-
419423
<!-- Shelf Pane -->
420424
<ToggleButton
421425
x:Name="ShelfPaneToggleButton"

0 commit comments

Comments
 (0)