mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-07-16 19:26:28 +00:00
34 lines
1.5 KiB
Plaintext
34 lines
1.5 KiB
Plaintext
|
|
@inherits MSGComponentBase
|
||
|
|
@inject MediaTranscriptionService MediaTranscriptionService
|
||
|
|
@using AIStudio.Tools.Services
|
||
|
|
|
||
|
|
@if (this.Snapshot is { IsBusy: true } snapshot)
|
||
|
|
{
|
||
|
|
@if (this.Compact)
|
||
|
|
{
|
||
|
|
<MudStack Row="true" AlignItems="AlignItems.Center" Class="pa-1">
|
||
|
|
<MudProgressCircular Size="Size.Small" Indeterminate="@(snapshot.Progress is null)" Value="@((snapshot.Progress ?? 0) * 100)"/>
|
||
|
|
<MudText Typo="Typo.body2">
|
||
|
|
@this.StatusText
|
||
|
|
</MudText>
|
||
|
|
<MudTooltip Text="@T("Stop media transcription")">
|
||
|
|
<MudIconButton Size="Size.Small" Icon="@Icons.Material.Filled.Stop" Color="Color.Error" OnClick="@(async () => await this.MediaTranscriptionService.StopAsync(this.Owner))"/>
|
||
|
|
</MudTooltip>
|
||
|
|
</MudStack>
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<MudPaper Outlined="true" Class="pa-2 mb-2">
|
||
|
|
<MudStack Row="true" AlignItems="AlignItems.Center">
|
||
|
|
<MudProgressCircular Size="Size.Small" Indeterminate="@(snapshot.Progress is null)" Value="@((snapshot.Progress ?? 0) * 100)"/>
|
||
|
|
<MudText Typo="Typo.body2">
|
||
|
|
@this.StatusText
|
||
|
|
</MudText>
|
||
|
|
<MudSpacer/>
|
||
|
|
<MudTooltip Text="@T("Stop media transcription")">
|
||
|
|
<MudIconButton Icon="@Icons.Material.Filled.Stop" Color="Color.Error" OnClick="@(async () => await this.MediaTranscriptionService.StopAsync(this.Owner))"/>
|
||
|
|
</MudTooltip>
|
||
|
|
</MudStack>
|
||
|
|
</MudPaper>
|
||
|
|
}
|
||
|
|
}
|