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) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 18:50:44 +02:00
parent 60358a6cf5
commit d61c1d85fa
2 changed files with 15 additions and 3 deletions

View File

@@ -74,6 +74,13 @@ public sealed partial class MainViewModel : ObservableObject
public ObservableCollection<HealthIndicatorViewModel> HealthIndicators { get; } = new(); public ObservableCollection<HealthIndicatorViewModel> HealthIndicators { get; } = new();
public bool HasHealthIndicators => HealthIndicators.Count > 0; public bool HasHealthIndicators => HealthIndicators.Count > 0;
/// <summary>
/// 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.
/// </summary>
public bool ShowHealthBanner => HasHealthIndicators && IsLibrary;
[ObservableProperty] [ObservableProperty]
[NotifyPropertyChangedFor(nameof(HasFeaturedVersion))] [NotifyPropertyChangedFor(nameof(HasFeaturedVersion))]
[NotifyPropertyChangedFor(nameof(HasOtherVersions))] [NotifyPropertyChangedFor(nameof(HasOtherVersions))]
@@ -110,6 +117,7 @@ public sealed partial class MainViewModel : ObservableObject
[NotifyPropertyChangedFor(nameof(IsDocumentation))] [NotifyPropertyChangedFor(nameof(IsDocumentation))]
[NotifyPropertyChangedFor(nameof(FooterVisibility))] [NotifyPropertyChangedFor(nameof(FooterVisibility))]
[NotifyPropertyChangedFor(nameof(FooterText))] [NotifyPropertyChangedFor(nameof(FooterText))]
[NotifyPropertyChangedFor(nameof(ShowHealthBanner))]
private LauncherPage _currentPage = LauncherPage.Library; private LauncherPage _currentPage = LauncherPage.Library;
public bool IsLibrary => 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) foreach (var entry in _config.HealthChecks.Checks)
HealthIndicators.Add(new HealthIndicatorViewModel(entry)); HealthIndicators.Add(new HealthIndicatorViewModel(entry));
OnPropertyChanged(nameof(HasHealthIndicators)); OnPropertyChanged(nameof(HasHealthIndicators));
OnPropertyChanged(nameof(ShowHealthBanner));
} }
/// <summary> /// <summary>

View File

@@ -343,14 +343,17 @@
<!-- ============== Health banner (Row 1, ColSpan 2) ============== <!-- ============== Health banner (Row 1, ColSpan 2) ==============
Pills colorées indiquant l'état des dépendances système (SteamVR, Pills colorées indiquant l'état des dépendances système (SteamVR,
Vive Streaming, ping casque…). Cachée si la config n'a aucun check. Vive Streaming, ping casque…). Visible uniquement sur la page
Tooltip détaillé au survol de chaque pill. --> 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. -->
<Border Grid.Row="1" Grid.ColumnSpan="2" <Border Grid.Row="1" Grid.ColumnSpan="2"
Background="{StaticResource Brush.Bg.Sidebar}" Background="{StaticResource Brush.Bg.Sidebar}"
BorderBrush="{StaticResource Brush.Border}" BorderBrush="{StaticResource Brush.Border}"
BorderThickness="0,0,0,1" BorderThickness="0,0,0,1"
Padding="16,8" Padding="16,8"
Visibility="{Binding HasHealthIndicators, Converter={StaticResource BoolToVisibility}}"> Visibility="{Binding ShowHealthBanner, Converter={StaticResource BoolToVisibility}}">
<ItemsControl ItemsSource="{Binding HealthIndicators}"> <ItemsControl ItemsSource="{Binding HealthIndicators}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>