Files
romrepomgr/RomRepoMgr.Blazor/Components/Dialogs/ImportRoms.razor
2025-12-23 09:20:04 +00:00

69 lines
3.0 KiB
Plaintext

@{
/******************************************************************************
// RomRepoMgr - ROM repository manager
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2020-2026 Natalia Portillo
*******************************************************************************/
}
@using Microsoft.Extensions.Localization
@using RomRepoMgr.Blazor.Resources
@using RomRepoMgr.Database
@implements IDialogContentComponent
@inject ILogger<ImportRoms> Logger
@inject Context _ctx
@inject IStringLocalizer<Localization> Localizer
@inject IConfiguration Configuration
<FluentDialog Width="1600px" Height="800px" Title="Import DATs" Modal="true" TrapFocus="true">
<FluentDialogBody>
<p hidden="@IsBusy">@string.Format(Localizer["ROMs_will_be_imported_from"], FolderPath)</p>
@if(NotYetStarted)
{
<FluentCheckbox @bind-Value="@RemoveFilesChecked" Label="@Localizer["RemoveFilesLabel"]"/>
<FluentCheckbox @bind-Value="@KnownOnlyChecked" Label="@Localizer["KnownOnlyLabel"]"/>
<FluentCheckbox @bind-Value="@RecurseArchivesChecked"
Label=@Localizer["RecurseArchivesLabel"]/>
}
@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">
<FluentButton OnClick="@Start" Disabled="@IsBusy">@Localizer["Start"]</FluentButton>
<FluentButton OnClick="@CloseAsync" Disabled="@CannotClose">@Localizer["Close"]</FluentButton>
</FluentStack>
</FluentDialogFooter>
</FluentDialog>