Add busy dialog
This commit is contained in:
@ -58,6 +58,7 @@
|
||||
</RadzenTabsItem>
|
||||
</Tabs>
|
||||
</RadzenTabs>
|
||||
<BusyDialog @ref=@busyDialog />
|
||||
|
||||
@code {
|
||||
sealed class PasswordInputModel
|
||||
@ -72,6 +73,7 @@
|
||||
bool hasError;
|
||||
string? errorMessage;
|
||||
bool hasSuccess;
|
||||
BusyDialog busyDialog;
|
||||
|
||||
[SupplyParameterFromForm]
|
||||
PasswordInputModel PasswordInput { get; set; } = new();
|
||||
@ -83,6 +85,8 @@
|
||||
|
||||
try
|
||||
{
|
||||
busyDialog.Show();
|
||||
|
||||
await IdentityService.ChangePassword(PasswordInput.OldPassword, PasswordInput.NewPassword);
|
||||
|
||||
hasSuccess = true;
|
||||
@ -92,5 +96,9 @@
|
||||
hasError = true;
|
||||
errorMessage = e.Message;
|
||||
}
|
||||
finally
|
||||
{
|
||||
busyDialog.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user