From d61c1d85faf79a6ba7c91575af358315be2866d6 Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Sun, 3 May 2026 18:50:44 +0200 Subject: [PATCH] Health banner Library-only (mirror of footer scoping) Same logic as the footer : the health pills make sense only when the user is on the Library page. On Reports / Documentation, the WebView takes the full content area and the system-status row would just steal vertical space without adding value (and arguably distracts from the embedded site). New ShowHealthBanner = HasHealthIndicators && IsLibrary, with NotifyPropertyChangedFor on CurrentPage so the row collapses/reveals on tab switch like the footer already does. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/PSLauncher.App/ViewModels/MainViewModel.cs | 9 +++++++++ src/PSLauncher.App/Views/MainWindow.xaml | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/PSLauncher.App/ViewModels/MainViewModel.cs b/src/PSLauncher.App/ViewModels/MainViewModel.cs index 05d635a..2a4695b 100644 --- a/src/PSLauncher.App/ViewModels/MainViewModel.cs +++ b/src/PSLauncher.App/ViewModels/MainViewModel.cs @@ -74,6 +74,13 @@ public sealed partial class MainViewModel : ObservableObject public ObservableCollection HealthIndicators { get; } = new(); public bool HasHealthIndicators => HealthIndicators.Count > 0; + /// + /// Le bandeau santé n'a de sens que sur la page Library — Reports et + /// Documentation sont des WebView pleine-page où afficher des pills + /// de monitoring système n'apporte rien et coupe visuellement. + /// + public bool ShowHealthBanner => HasHealthIndicators && IsLibrary; + [ObservableProperty] [NotifyPropertyChangedFor(nameof(HasFeaturedVersion))] [NotifyPropertyChangedFor(nameof(HasOtherVersions))] @@ -110,6 +117,7 @@ public sealed partial class MainViewModel : ObservableObject [NotifyPropertyChangedFor(nameof(IsDocumentation))] [NotifyPropertyChangedFor(nameof(FooterVisibility))] [NotifyPropertyChangedFor(nameof(FooterText))] + [NotifyPropertyChangedFor(nameof(ShowHealthBanner))] private LauncherPage _currentPage = LauncherPage.Library; public bool IsLibrary => CurrentPage == LauncherPage.Library; @@ -307,6 +315,7 @@ public sealed partial class MainViewModel : ObservableObject foreach (var entry in _config.HealthChecks.Checks) HealthIndicators.Add(new HealthIndicatorViewModel(entry)); OnPropertyChanged(nameof(HasHealthIndicators)); + OnPropertyChanged(nameof(ShowHealthBanner)); } /// diff --git a/src/PSLauncher.App/Views/MainWindow.xaml b/src/PSLauncher.App/Views/MainWindow.xaml index 617f55d..452c31f 100644 --- a/src/PSLauncher.App/Views/MainWindow.xaml +++ b/src/PSLauncher.App/Views/MainWindow.xaml @@ -343,14 +343,17 @@ + Vive Streaming, ping casque…). Visible uniquement sur la page + Library — sur Reports/Documentation, les WebView prennent toute + la place et le bandeau n'a pas de sens fonctionnel. Cachée aussi + si la config n'a aucun check (ShowHealthBanner = HasHealthIndicators + && IsLibrary). Tooltip détaillé au survol de chaque pill. --> + Visibility="{Binding ShowHealthBanner, Converter={StaticResource BoolToVisibility}}">