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:
@@ -74,6 +74,13 @@ public sealed partial class MainViewModel : ObservableObject
|
||||
public ObservableCollection<HealthIndicatorViewModel> HealthIndicators { get; } = new();
|
||||
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]
|
||||
[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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user