Skip to content

Commit bfe3918

Browse files
authored
Code Quality: Added placeholder content for Shelf (#17058)
1 parent 15e864a commit bfe3918

11 files changed

+291
-6
lines changed
Loading
Loading
Loading
Loading
Loading
Loading

src/Files.App/Converters/Converters.cs

+27
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,31 @@ protected override Visibility Convert(object? value, object? parameter, string?
238238
return new NotSupportedException();
239239
}
240240
}
241+
242+
internal sealed partial class EmptyListToVisibilityConverter : ValueConverter<object?, Visibility>
243+
{
244+
protected override Visibility Convert(object? value, object? parameter, string? language)
245+
{
246+
return (value is int count && count == 0) ? Visibility.Visible : Visibility.Collapsed;
247+
}
248+
249+
protected override object? ConvertBack(Visibility value, object? parameter, string? language)
250+
{
251+
return new NotSupportedException();
252+
}
253+
}
254+
255+
internal sealed partial class PopulatedListToVisibilityConverter : ValueConverter<object?, Visibility>
256+
{
257+
protected override Visibility Convert(object? value, object? parameter, string? language)
258+
{
259+
return (value is int count && count > 0) ? Visibility.Visible : Visibility.Collapsed;
260+
}
261+
262+
protected override object? ConvertBack(Visibility value, object? parameter, string? language)
263+
{
264+
return new NotSupportedException();
265+
}
266+
}
241267
}
268+

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -4197,6 +4197,9 @@
41974197
<value>Enable Omnibar</value>
41984198
</data>
41994199
<data name="SectionsHiddenMessage" xml:space="preserve">
4200-
<value>You can add sections to the sidebar by right-clicking and selecting the sections you want to add.</value>
4200+
<value>You can add sections to the sidebar by right-clicking and selecting the sections you want to add</value>
4201+
</data>
4202+
<data name="EmptyShelfText" xml:space="preserve">
4203+
<value>Drag files or folders here to interact with them across different tabs</value>
42014204
</data>
42024205
</root>

src/Files.App/UserControls/NavigationToolbar.xaml

+1
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@
325325
<!-- Right Side Action Buttons -->
326326
<StackPanel
327327
Grid.Column="2"
328+
Margin="0,0,4,0"
328329
Orientation="Horizontal"
329330
Spacing="4">
330331

0 commit comments

Comments
 (0)