diff --git a/src/Files.App/Styles/StatusCenterInfoBadgeStyles.xaml b/src/Files.App/Styles/StatusCenterInfoBadgeStyles.xaml new file mode 100644 index 000000000000..744569cd754f --- /dev/null +++ b/src/Files.App/Styles/StatusCenterInfoBadgeStyles.xaml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml b/src/Files.App/UserControls/NavigationToolbar.xaml index a44bb56ffa46..85a9f176cbc0 100644 --- a/src/Files.App/UserControls/NavigationToolbar.xaml +++ b/src/Files.App/UserControls/NavigationToolbar.xaml @@ -20,8 +20,6 @@ xmlns:vm="using:Files.App.ViewModels.UserControls" x:Name="NavToolbar" Height="50" - d:DesignHeight="50" - d:DesignWidth="800" Loading="NavToolbar_Loading" mc:Ignorable="d"> @@ -32,6 +30,7 @@ + @@ -50,476 +49,318 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - + + + - - - - - + x:Load="{x:Bind ViewModel.IsUpdating, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}" + IsFilled="True" + Style="{StaticResource App.ThemedIcons.AppUpdateAvailable}" /> + + + + + + + + + + + + diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml.cs b/src/Files.App/UserControls/NavigationToolbar.xaml.cs index 46d44be05f85..bb9730dd290b 100644 --- a/src/Files.App/UserControls/NavigationToolbar.xaml.cs +++ b/src/Files.App/UserControls/NavigationToolbar.xaml.cs @@ -21,8 +21,8 @@ public sealed partial class NavigationToolbar : UserControl private readonly IUserSettingsService userSettingsService = Ioc.Default.GetRequiredService(); private readonly MainPageViewModel MainPageViewModel = Ioc.Default.GetRequiredService(); - public ICommandManager Commands = Ioc.Default.GetRequiredService(); - public StatusCenterViewModel? OngoingTasksViewModel { get; set; } + private readonly ICommandManager Commands = Ioc.Default.GetRequiredService(); + private readonly StatusCenterViewModel OngoingTasksViewModel = Ioc.Default.GetRequiredService(); // Properties @@ -108,8 +108,7 @@ private void VisiblePath_LostFocus(object _, RoutedEventArgs e) if (element is FlyoutBase or AppBarButton or Popup) return; - var control = element as Control; - if (control is null) + if (element is not Control control) { if (ViewModel.IsEditModeEnabled) ViewModel.IsEditModeEnabled = false; diff --git a/src/Files.App/Views/MainPage.xaml b/src/Files.App/Views/MainPage.xaml index d13211e23e3b..806d3b434327 100644 --- a/src/Files.App/Views/MainPage.xaml +++ b/src/Files.App/Views/MainPage.xaml @@ -150,7 +150,6 @@ HorizontalContentAlignment="Stretch" x:Load="False" Loaded="NavToolbar_Loaded" - OngoingTasksViewModel="{x:Bind OngoingTasksViewModel}" ShowOngoingTasks="True" ShowSearchBox="True" TabIndex="1" /> diff --git a/src/Files.App/Views/MainPage.xaml.cs b/src/Files.App/Views/MainPage.xaml.cs index e30370e03f3d..558dc8fd3efd 100644 --- a/src/Files.App/Views/MainPage.xaml.cs +++ b/src/Files.App/Views/MainPage.xaml.cs @@ -31,7 +31,6 @@ public sealed partial class MainPage : Page public ICommandManager Commands { get; } public SidebarViewModel SidebarAdaptiveViewModel { get; } public MainPageViewModel ViewModel { get; } - public StatusCenterViewModel OngoingTasksViewModel { get; } private bool keyReleased = true; @@ -47,7 +46,6 @@ public MainPage() SidebarAdaptiveViewModel = Ioc.Default.GetRequiredService(); SidebarAdaptiveViewModel.PaneFlyout = (MenuFlyout)Resources["SidebarContextMenu"]; ViewModel = Ioc.Default.GetRequiredService(); - OngoingTasksViewModel = Ioc.Default.GetRequiredService(); if (FilePropertiesHelpers.FlowDirectionSettingIsRightToLeft) FlowDirection = FlowDirection.RightToLeft;