Footer is Library-only: hide on Report/Documentation tabs
The download/install progress footer made no visual sense on the WebView pages — it would float above the embedded site. It now only appears when CurrentPage = Library. The DL itself keeps running in the background while the user browses Reports or Docs; switching back to Library restores the live footer. Implementation: FooterVisibility now ANDs with IsLibrary, and CurrentPage notifies FooterVisibility/FooterText so the footer collapses/reveals on tab switch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,14 +75,19 @@ public sealed partial class MainViewModel : ObservableObject
|
|||||||
[ObservableProperty] private double _progressPercent;
|
[ObservableProperty] private double _progressPercent;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Onglet actuellement actif dans la sidebar droite. La UI montre le bon bloc
|
/// Onglet actuellement actif dans la sidebar gauche. La UI montre le bon bloc
|
||||||
/// via les converters IsLibrary / IsReport / IsDocumentation. Default = Library
|
/// via les converters IsLibrary / IsReport / IsDocumentation. Default = Library
|
||||||
/// pour que le launcher s'ouvre directement sur l'écran principal.
|
/// pour que le launcher s'ouvre directement sur l'écran principal.
|
||||||
|
/// On notifie aussi FooterVisibility/FooterText : le footer (barre de DL,
|
||||||
|
/// status d'install) appartient à la page Library uniquement — il n'a aucun
|
||||||
|
/// sens visuel sur Report/Documentation qui sont des WebView pleine page.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
[NotifyPropertyChangedFor(nameof(IsLibrary))]
|
[NotifyPropertyChangedFor(nameof(IsLibrary))]
|
||||||
[NotifyPropertyChangedFor(nameof(IsReport))]
|
[NotifyPropertyChangedFor(nameof(IsReport))]
|
||||||
[NotifyPropertyChangedFor(nameof(IsDocumentation))]
|
[NotifyPropertyChangedFor(nameof(IsDocumentation))]
|
||||||
|
[NotifyPropertyChangedFor(nameof(FooterVisibility))]
|
||||||
|
[NotifyPropertyChangedFor(nameof(FooterText))]
|
||||||
private LauncherPage _currentPage = LauncherPage.Library;
|
private LauncherPage _currentPage = LauncherPage.Library;
|
||||||
|
|
||||||
public bool IsLibrary => CurrentPage == LauncherPage.Library;
|
public bool IsLibrary => CurrentPage == LauncherPage.Library;
|
||||||
@@ -190,8 +195,16 @@ public sealed partial class MainViewModel : ObservableObject
|
|||||||
FeaturedVersion is null && OtherVersions.Count == 0
|
FeaturedVersion is null && OtherVersions.Count == 0
|
||||||
? Visibility.Visible : Visibility.Collapsed;
|
? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Footer visible UNIQUEMENT sur la page Library : c'est elle qui héberge
|
||||||
|
/// les téléchargements et installs, donc le seul contexte où la barre
|
||||||
|
/// de progression a du sens. Sur Report/Documentation (WebView pleine page),
|
||||||
|
/// le footer disparaît même si IsBusy ou StatusMessage non vide — l'opération
|
||||||
|
/// continue en arrière-plan, le user retrouve son état en revenant sur Library.
|
||||||
|
/// </summary>
|
||||||
public Visibility FooterVisibility =>
|
public Visibility FooterVisibility =>
|
||||||
IsBusy || !string.IsNullOrEmpty(StatusMessage) ? Visibility.Visible : Visibility.Collapsed;
|
IsLibrary && (IsBusy || !string.IsNullOrEmpty(StatusMessage))
|
||||||
|
? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
|
||||||
public string FooterText =>
|
public string FooterText =>
|
||||||
!string.IsNullOrEmpty(ProgressDetail) ? ProgressDetail :
|
!string.IsNullOrEmpty(ProgressDetail) ? ProgressDetail :
|
||||||
|
|||||||
Reference in New Issue
Block a user