dashboard: lazy-load BrowsePage via DashboardBrowseService
This commit is contained in:
@@ -29,6 +29,33 @@ public sealed class DashboardBrowseNode
|
||||
|
||||
/// <summary>True when the node has child objects or attributes to expand.</summary>
|
||||
public bool HasChildren => Children.Count > 0 || Object.Attributes.Count > 0;
|
||||
|
||||
/// <summary>Whether this node has at least one matching descendant, per the
|
||||
/// server's <c>child_has_children</c> projector hint. Controls whether the UI
|
||||
/// shows an expand triangle before children have actually loaded.</summary>
|
||||
public bool HasChildrenHint { get; init; }
|
||||
|
||||
/// <summary>The lazy-load state for this node's children.</summary>
|
||||
public BrowseLoadState LoadState { get; set; } = BrowseLoadState.NotLoaded;
|
||||
|
||||
/// <summary>Short error string if the last load attempt failed; null otherwise.</summary>
|
||||
public string? LoadError { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>Lazy-load lifecycle of a browse node's children.</summary>
|
||||
public enum BrowseLoadState
|
||||
{
|
||||
/// <summary>Children have not been requested yet.</summary>
|
||||
NotLoaded,
|
||||
|
||||
/// <summary>A load is in progress.</summary>
|
||||
Loading,
|
||||
|
||||
/// <summary>Children have been loaded into <see cref="DashboardBrowseNode.Children"/>.</summary>
|
||||
Loaded,
|
||||
|
||||
/// <summary>The last load attempt failed; see <see cref="DashboardBrowseNode.LoadError"/>.</summary>
|
||||
Error,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user