@using System.Text.Json.Serialization @using ArcaneLibs.Extensions @using BugMine.Web.Classes.Exceptions @using LibMatrix @inject ILogger Logger @if (Constants.Debug) {
IssueContainer Debug info - Debug build, here be dragons!

IssueContainer debug info:

@*
Slug: @ProjectSlug
*@ @*
Progress: @Progress.ToString()
*@ @* @if (ProjectContext is null) { *@ @*
ProjectContext is null!
*@ @* } *@ @* else { *@ @*
*@ @* Context json dump *@ @*
@ProjectContext.ToJson()
*@ @*
*@ @* @if (ProjectContext?.Project?.Room is not null) { *@ @* Dispose room *@ @* } *@ @* } *@

} @if (ProjectContext?.Client is null) {

Authenticating

} else { @ChildContent } @code { private Status? _progress = Status.Loading; [Parameter] public string IssueId { get; set; } = null!; [Parameter, CascadingParameter] public ProjectContainer.ProjectContainerContext? ProjectContext { get; set; } [Parameter] public IssueContainerContext? IssueContext { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } [Parameter] public Func? Loaded { get; set; } private Status? Progress { get => _progress; set { _progress = value; StateHasChanged(); } } protected override async Task OnInitializedAsync() { if (ProjectContext is null) { Logger.LogError("ProjectContext is null"); ProjectContext = new(); } if (ProjectContext.Project != null) { Logger.LogWarning("ProjectContext.Project is not null"); } ProjectContext.Client ??= await BugMineStorage.GetCurrentSessionOrNavigate(); if (ProjectContext.Client == null) { return; } Progress = Status.Loading; Progress = Status.Done; if (Loaded != null) { await Loaded.Invoke(); } StateHasChanged(); } public class IssueContainerContext { public ProjectContainer.ProjectContainerContext ProjectContext { get; set; } } private enum Status { Loading, NotInRoom, RoomNotFound, Done } }