LANCommander/LANCommander.Launcher/UI/Components/ReportIssueDialog.razor
Pat Hartl 5a32bbf890 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

43 lines
1.2 KiB
Text

@using BootstrapBlazor.Components
@inherits FeedbackComponent<Data.Models.Game, SDK.Models.Issue>
@inject SDK.Client Client
@inject IMessageService MessageService
@inject LocalizationService LocalizationService
<Form Model="Issue">
<FormItem Style="margin-bottom: 0">
<TextArea @bind-Value="@context.Description" MinRows="10" />
</FormItem>
</Form>
@code {
SDK.Models.Issue Issue { get; set; } = new SDK.Models.Issue();
public override async Task OnFeedbackOkAsync(ModalClosingEventArgs args)
{
try {
Issue.GameId = Options.Id;
var success = await Client.Issues.Open(Issue.Description, Issue.GameId);
if (success)
{
MessageService.Success(LocalizationService.GetString("IssueReported"));
await base.FeedbackRef.CloseAsync();
}
else
{
MessageService.Error(LocalizationService.GetString("UnknownErrorIssueNotReported"));
args.Reject();
}
}
catch (Exception ex)
{
MessageService.Error(LocalizationService.GetString("UnknownErrorIssueNotReported"));
args.Reject();
}
}
}