2025-07-27 18:29:58 +01:00
|
|
|
@using Microsoft.Extensions.Localization
|
2025-07-27 17:19:25 +01:00
|
|
|
@using RomRepoMgr.Blazor.Resources
|
2025-07-27 14:32:04 +01:00
|
|
|
@using RomRepoMgr.Database
|
|
|
|
|
@implements IDialogContentComponent
|
2025-07-27 17:19:25 +01:00
|
|
|
@inject ILogger<ImportRoms> Logger
|
|
|
|
|
@inject Context _ctx
|
|
|
|
|
@inject IStringLocalizer<Localization> Localizer
|
2025-07-27 18:19:01 +01:00
|
|
|
@inject IConfiguration Configuration
|
2025-07-27 14:32:04 +01:00
|
|
|
|
|
|
|
|
<FluentDialog Width="1600px" Height="800px" Title="Import DATs" Modal="true" TrapFocus="true">
|
|
|
|
|
<FluentDialogBody>
|
2025-07-27 17:19:25 +01:00
|
|
|
<p hidden="@IsBusy">@string.Format(Localizer["ROMs_will_be_imported_from"], FolderPath)</p>
|
2025-07-27 14:32:04 +01:00
|
|
|
@if(NotYetStarted)
|
|
|
|
|
{
|
2025-07-27 17:19:25 +01:00
|
|
|
<FluentCheckbox @bind-Value="@RemoveFilesChecked" Label="@Localizer["RemoveFilesLabel"]"/>
|
2025-07-27 14:32:04 +01:00
|
|
|
|
2025-07-27 17:19:25 +01:00
|
|
|
<FluentCheckbox @bind-Value="@KnownOnlyChecked" Label="@Localizer["KnownOnlyLabel"]"/>
|
2025-07-27 14:32:04 +01:00
|
|
|
|
|
|
|
|
<FluentCheckbox @bind-Value="@RecurseArchivesChecked"
|
2025-07-27 17:19:25 +01:00
|
|
|
Label=@Localizer["RecurseArchivesLabel"]/>
|
2025-07-27 14:32:04 +01:00
|
|
|
}
|
|
|
|
|
@if(Importing)
|
|
|
|
|
{
|
|
|
|
|
<div>
|
|
|
|
|
<FluentLabel Color="@StatusMessageColor">@StatusMessage</FluentLabel>
|
|
|
|
|
<FluentProgress Max="@ProgressMax" Min="@ProgressMin" Value="@ProgressValue"/>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@if(Progress2Visible)
|
|
|
|
|
{
|
|
|
|
|
<div>
|
|
|
|
|
<FluentLabel>@StatusMessage2</FluentLabel>
|
|
|
|
|
<FluentProgress Max="@Progress2Max" Min="@Progress2Min" Value="@Progress2Value"/>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</FluentDialogBody>
|
|
|
|
|
<FluentDialogFooter>
|
|
|
|
|
<FluentStack Orientation="Orientation.Horizontal">
|
2025-07-27 17:19:25 +01:00
|
|
|
<FluentButton OnClick="@Start" Disabled="@IsBusy">@Localizer["Start"]</FluentButton>
|
|
|
|
|
<FluentButton OnClick="@CloseAsync" Disabled="@CannotClose">@Localizer["Close"]</FluentButton>
|
2025-07-27 14:32:04 +01:00
|
|
|
</FluentStack>
|
|
|
|
|
</FluentDialogFooter>
|
|
|
|
|
</FluentDialog>
|