This commit is contained in:
EugeneTes
2026-03-19 09:03:37 +01:00
parent 14fe822962
commit 83597b8763
55 changed files with 2136 additions and 32 deletions

View File

@@ -0,0 +1,27 @@
@using MudBlazor
<MudDialog>
<DialogContent>
<MudTextField @bind-Value="_password" Label="Password" InputType="InputType.Password"
Immediate="true" OnKeyDown="OnKeyDown" AutoFocus="true" />
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel">Cancel</MudButton>
<MudButton Color="Color.Primary" OnClick="Submit">OK</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = null!;
private string _password = "";
private void Submit() => MudDialog.Close(DialogResult.Ok(_password));
private void Cancel() => MudDialog.Cancel();
private void OnKeyDown(KeyboardEventArgs e)
{
if (e.Key == "Enter")
Submit();
}
}