Skip to content

Commit 9553371

Browse files
committed
Code Quality: Added placeholder content for Shelf
1 parent e2b0511 commit 9553371

File tree

11 files changed

+289
-5
lines changed

11 files changed

+289
-5
lines changed
Lines changed: 39 additions & 0 deletions
Loading
Lines changed: 39 additions & 0 deletions
Loading
Lines changed: 49 additions & 0 deletions
Loading
Lines changed: 49 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Loading

src/Files.App/Converters/Converters.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,32 @@ 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+
/// <summary>
245+
/// Converts a source value to the target type.
246+
/// </summary>
247+
/// <param name="value"></param>
248+
/// <param name="parameter"></param>
249+
/// <param name="language"></param>
250+
/// <returns></returns>
251+
protected override Visibility Convert(object? value, object? parameter, string? language)
252+
{
253+
return (value is int count && count == 0) ? Visibility.Visible : Visibility.Collapsed;
254+
}
255+
256+
/// <summary>
257+
/// Converts a target value back to the source type.
258+
/// </summary>
259+
/// <param name="value"></param>
260+
/// <param name="parameter"></param>
261+
/// <param name="language"></param>
262+
/// <returns></returns>
263+
protected override object? ConvertBack(Visibility value, object? parameter, string? language)
264+
{
265+
return new NotSupportedException();
266+
}
267+
}
241268
}
269+

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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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)