2025-02-04 18:39:29 -06:00
|
|
|
@using LANCommander.SDK.Models
|
2025-12-31 20:01:04 -06:00
|
|
|
@namespace LANCommander.Launcher.UI
|
2024-11-04 17:31:37 -06:00
|
|
|
@inherits FeedbackComponent<Data.Models.Game>
|
2025-12-31 20:01:04 -06:00
|
|
|
@inject GameClient GameClient
|
Add localization support to launcher
Adds localization across the launcher and includes English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Portuguese, Ukranian, and Chinese. These localizations were generated by Claude 3.5 and need to be reviewed by a human for accuracy.
2025-08-18 21:29:38 -05:00
|
|
|
@inject LocalizationService LocalizationService
|
2024-11-04 17:31:37 -06:00
|
|
|
|
2024-11-14 20:53:08 -06:00
|
|
|
<Table DataSource="Conflicts" Resizable Size="TableSize.Small" RowKey="c => c.FullName" @bind-SelectedRows="Selected" Loading="Loading">
|
2024-12-31 18:21:41 -06:00
|
|
|
<Selection Type="SelectionType.Checkbox" />
|
Add localization support to launcher
Adds localization across the launcher and includes English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Portuguese, Ukranian, and Chinese. These localizations were generated by Claude 3.5 and need to be reviewed by a human for accuracy.
2025-08-18 21:29:38 -05:00
|
|
|
<PropertyColumn Property="c => c.FullName" Title="@LocalizationService.GetString("Name")" />
|
|
|
|
|
<Column TData="string" Title="@LocalizationService.GetString("Created")">
|
2024-11-14 20:53:08 -06:00
|
|
|
@context.LocalFileInfo?.CreationTime
|
|
|
|
|
</Column>
|
Add localization support to launcher
Adds localization across the launcher and includes English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Portuguese, Ukranian, and Chinese. These localizations were generated by Claude 3.5 and need to be reviewed by a human for accuracy.
2025-08-18 21:29:38 -05:00
|
|
|
<Column TData="string" Title="@LocalizationService.GetString("Modified")">
|
2024-11-14 20:53:08 -06:00
|
|
|
@context.LocalFileInfo?.LastWriteTime
|
|
|
|
|
</Column>
|
Add localization support to launcher
Adds localization across the launcher and includes English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Portuguese, Ukranian, and Chinese. These localizations were generated by Claude 3.5 and need to be reviewed by a human for accuracy.
2025-08-18 21:29:38 -05:00
|
|
|
<Column TData="string" Title="@LocalizationService.GetString("LocalSize")">
|
2024-11-14 20:53:08 -06:00
|
|
|
@if (context.LocalFileInfo?.Length > 0)
|
|
|
|
|
{
|
2025-01-29 23:02:59 -06:00
|
|
|
<ByteSize Value="context.LocalFileInfo.Length" />
|
2024-11-14 20:53:08 -06:00
|
|
|
}
|
|
|
|
|
</Column>
|
Add localization support to launcher
Adds localization across the launcher and includes English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Portuguese, Ukranian, and Chinese. These localizations were generated by Claude 3.5 and need to be reviewed by a human for accuracy.
2025-08-18 21:29:38 -05:00
|
|
|
<PropertyColumn Property="c => c.Length" Title="@LocalizationService.GetString("OriginalSize")">
|
2024-11-14 20:53:08 -06:00
|
|
|
@if (context.Length > 0)
|
|
|
|
|
{
|
2025-01-29 23:02:59 -06:00
|
|
|
<ByteSize Value="context.Length" />
|
2024-11-14 20:53:08 -06:00
|
|
|
}
|
|
|
|
|
</PropertyColumn>
|
Add localization support to launcher
Adds localization across the launcher and includes English, German, Spanish, French, Italian, Japanese, Korean, Dutch, Portuguese, Ukranian, and Chinese. These localizations were generated by Claude 3.5 and need to be reviewed by a human for accuracy.
2025-08-18 21:29:38 -05:00
|
|
|
<Column TData="string" Title="@LocalizationService.GetString("SourceGame")">
|
2025-05-18 03:09:22 +02:00
|
|
|
@{
|
|
|
|
|
GameTitleMap.TryGetValue(context.GameId.GetValueOrDefault(Guid.Empty), out var title);
|
|
|
|
|
}
|
|
|
|
|
@(title ?? Options.Title)
|
|
|
|
|
</Column>
|
2024-11-04 17:31:37 -06:00
|
|
|
</Table>
|
|
|
|
|
|
|
|
|
|
@code {
|
2024-11-14 20:53:08 -06:00
|
|
|
IEnumerable<ArchiveValidationConflict> Conflicts = new List<ArchiveValidationConflict>();
|
|
|
|
|
IEnumerable<ArchiveValidationConflict> Selected = new List<ArchiveValidationConflict>();
|
|
|
|
|
|
2025-05-18 03:09:22 +02:00
|
|
|
IDictionary<Guid, string> GameTitleMap = new Dictionary<Guid, string>();
|
|
|
|
|
|
2024-11-14 20:53:08 -06:00
|
|
|
bool Loading = true;
|
2024-11-04 17:31:37 -06:00
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
{
|
|
|
|
|
await LoadData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async Task Close()
|
|
|
|
|
{
|
|
|
|
|
await CloseFeedbackAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async Task LoadData()
|
|
|
|
|
{
|
2025-05-18 03:09:22 +02:00
|
|
|
var localAddons = Options.DependentGames?.Where(g => g.Installed).ToArray() ?? [];
|
|
|
|
|
GameTitleMap = localAddons.ToDictionary(x => x.Id, x => x.Title);
|
|
|
|
|
|
2025-12-31 20:01:04 -06:00
|
|
|
Conflicts = await GameClient.ValidateFilesAsync(Options.InstallDirectory, Options.Id);
|
2024-11-14 20:53:08 -06:00
|
|
|
|
|
|
|
|
Loading = false;
|
2024-11-04 17:31:37 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task OnFeedbackOkAsync(ModalClosingEventArgs args)
|
|
|
|
|
{
|
2024-11-14 20:53:08 -06:00
|
|
|
Loading = true;
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
await Task.Yield();
|
|
|
|
|
|
2025-12-31 20:01:04 -06:00
|
|
|
await GameClient.DownloadFilesAsync(Options.InstallDirectory, Selected.Select(e => (e.GameId ?? Options.Id, e.FullName)).ToArray());
|
2024-11-04 17:31:37 -06:00
|
|
|
|
2024-11-14 20:53:08 -06:00
|
|
|
Loading = false;
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
await Task.Yield();
|
|
|
|
|
|
2024-11-04 17:31:37 -06:00
|
|
|
await base.CloseFeedbackAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|