1
0
mirror of synced 2024-12-05 03:17:58 +01:00
TaikoLocalServer/TaikoWebUI/Pages/Dialogs/UserQrCodeDialog.razor

38 lines
892 B
Plaintext
Raw Normal View History

2023-10-01 14:09:04 +02:00
@using TaikoWebUI.Shared.Models
@using System.Collections.Immutable
@inject IGameDataService GameDataService
2023-10-03 20:20:51 +02:00
<MudDialog Class="dialog-user-qr-code">
2023-10-01 14:09:04 +02:00
<DialogContent>
<MudExtensions.MudBarcode
Value="@qrCode"
BarcodeFormat="ZXing.BarcodeFormat.QR_CODE"
Height="300"
2023-10-03 20:20:51 +02:00
Width="300" />
2023-10-01 14:09:04 +02:00
</DialogContent>
<DialogActions>
<MudButton Color="Color.Primary" OnClick="Submit">Ok</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter]
MudDialogInstance MudDialog { get; set; } = null!;
[Parameter]
public User User { get; set; } = new();
private string qrCode = string.Empty;
protected override void OnInitialized()
{
base.OnInitialized();
qrCode = "BNTTCNID" + User.AccessCode;
}
private void Submit()
{
MudDialog.Close(DialogResult.Ok(true));
}
}