2024-05-08 07:21:37 +00:00
|
|
|
@page "/"
|
2024-05-08 10:14:30 +00:00
|
|
|
@inherits HomeBase
|
|
|
|
@rendermode InteractiveServer
|
2024-05-08 07:21:37 +00:00
|
|
|
|
|
|
|
<PageTitle>Home</PageTitle>
|
|
|
|
|
2024-05-08 10:14:30 +00:00
|
|
|
<div id="file-selection">
|
|
|
|
@if (string.IsNullOrWhiteSpace(SelectedFile))
|
|
|
|
{
|
|
|
|
<p>No file selected</p>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<p>@SelectedFile.Split("/").LastOrDefault()</p>
|
|
|
|
}
|
2024-05-08 07:21:37 +00:00
|
|
|
|
2024-05-08 10:14:30 +00:00
|
|
|
<h3>Available files</h3>
|
|
|
|
|
|
|
|
<ul class="@(TranscribeInProgress ? "transcribing" : "")">
|
|
|
|
@foreach (var file in Files)
|
|
|
|
{
|
|
|
|
<li class="@(SelectedFile == file ? "selected" : "")" @onclick="() => SelectFile(file)">
|
|
|
|
@file.Split("/").LastOrDefault()
|
|
|
|
</li>
|
|
|
|
}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<button @onclick="Transcribe" disabled="@TranscribeInProgress">
|
|
|
|
@if (TranscribeInProgress)
|
|
|
|
{
|
|
|
|
<span>Transcribing...</span>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<span>Transcribe</span>
|
|
|
|
}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="results">
|
|
|
|
<h3>Transcription</h3>
|
|
|
|
|
|
|
|
@if (string.IsNullOrWhiteSpace(Transcription))
|
|
|
|
{
|
|
|
|
<p>No transcription results</p>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<div id="transcription">@Transcription</div>
|
|
|
|
}
|
|
|
|
</div>
|