AI-Studio/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingBuildProgress.razor

51 lines
2.9 KiB
Plaintext

@inherits MSGComponentBase
<MudExpansionPanels Class="mb-4 visual-briefing-build-progress" Elevation="0">
<MudExpansionPanel Text="@this.BuildProgressTitle" Expanded="@(this.Build?.Status is not VisualBriefingBuildStatus.COMPLETED)">
<MudStepper ActiveIndex="@this.BuildStepperIndex"
CompletedStepColor="Color.Primary"
CurrentStepColor="Color.Primary"
ErrorStepColor="Color.Error"
NonLinear="@false"
OnPreviewInteraction="@PreventBuildStepperInteractionAsync"
ShowResetButton="@false">
<ChildContent>
@for (var index = 0; index < STAGE_GROUPS.Length; index++)
{
var stepIndex = index;
<MudStep Title="@this.StepTitle(stepIndex)" Completed="@this.BuildGroupCompleted(stepIndex)" HasError="@this.BuildGroupStopped(stepIndex)">
<MudStack Spacing="1" Class="mt-2">
<MudText Typo="Typo.body2">@this.BuildGroupSummary(stepIndex)</MudText>
@if (this.BuildGroupRunning(stepIndex))
{
<MudProgressLinear Color="Color.Primary" Indeterminate="true"/>
<MudText Typo="Typo.body2">@string.Format(T("{0} in progress..."), this.StepTitle(stepIndex))</MudText>
}
@if (this.BuildGroupStopped(stepIndex))
{
<MudAlert Severity="Severity.Error" Dense="true">
@this.BuildGroupFailure(stepIndex)
</MudAlert>
@if (this.Build?.Status is VisualBriefingBuildStatus.FAILED or VisualBriefingBuildStatus.CANCELED)
{
<MudButton Variant="Variant.Filled"
Color="Color.Primary"
StartIcon="@Icons.Material.Filled.PlayArrow"
Disabled="@this.Disabled"
OnClick="@this.OnResume">
@T("Resume build")
</MudButton>
}
}
</MudStack>
</MudStep>
}
</ChildContent>
@* The build runs on its own. Overriding the actions with empty content keeps MudBlazor from
rendering its Previous, Next, Skip, and Complete buttons, which have nothing to do here. *@
<ActionContent></ActionContent>
</MudStepper>
</MudExpansionPanel>
</MudExpansionPanels>