Improved the media pipeline status display

This commit is contained in:
Thorsten Sommer 2026-07-14 19:02:23 +02:00
parent a5088d74c8
commit abffc4aed3
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 12 additions and 4 deletions

View File

@ -8,10 +8,16 @@
<MudButton StartIcon="@Icons.Material.Filled.Description" OnClick="@(async () => await this.SelectFile())" Variant="Variant.Filled" Disabled="@this.IsUnavailable">
@this.ButtonText
</MudButton>
<MudText Typo="Typo.body2">
@T("Drop one file here to load its content.")
</MudText>
<MediaTranscriptionStatus Owner="@this.EffectiveImportOwner" TargetId="@this.EffectiveMediaImportTarget.TargetId" Compact="true"/>
@if (this.IsCurrentTargetBusy)
{
<MediaTranscriptionStatus Owner="@this.EffectiveImportOwner" TargetId="@this.EffectiveMediaImportTarget.TargetId" Compact="true"/>
}
else
{
<MudText Typo="Typo.body2">
@T("Drop one file here to load its content.")
</MudText>
}
</MudStack>
</MudPaper>
</div>

View File

@ -74,6 +74,8 @@ public partial class ReadFileContent : MSGComponentBase
private string dragClass = DEFAULT_DRAG_CLASS;
private uint numDropAreasAboveThis;
private bool isComponentHovered;
private bool IsCurrentTargetBusy => this.MediaTranscriptionService.GetSnapshot(this.EffectiveImportOwner) is { IsBusy: true } snapshot
&& snapshot.Target == this.EffectiveMediaImportTarget;
private bool IsUnavailable => this.Disabled || this.MediaTranscriptionService.IsBusy(this.EffectiveImportOwner);
#region Overrides of MSGComponentBase