diff --git a/Hcs.WebApp/Components/Layout/MainLayout.razor b/Hcs.WebApp/Components/Layout/MainLayout.razor
index 1823f3f..264fbdb 100644
--- a/Hcs.WebApp/Components/Layout/MainLayout.razor
+++ b/Hcs.WebApp/Components/Layout/MainLayout.razor
@@ -5,6 +5,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService
+
diff --git a/Hcs.WebApp/Components/Pages/Account/Manage.razor b/Hcs.WebApp/Components/Pages/Account/Manage.razor
index e83291f..93f9bb2 100644
--- a/Hcs.WebApp/Components/Pages/Account/Manage.razor
+++ b/Hcs.WebApp/Components/Pages/Account/Manage.razor
@@ -58,6 +58,7 @@
+
@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();
+ }
}
}
diff --git a/Hcs.WebApp/Components/Shared/BusyDialog.razor b/Hcs.WebApp/Components/Shared/BusyDialog.razor
new file mode 100644
index 0000000..fb7b524
--- /dev/null
+++ b/Hcs.WebApp/Components/Shared/BusyDialog.razor
@@ -0,0 +1,26 @@
+@inject DialogService DialogService
+
+@code {
+ public void Show()
+ {
+ DialogService.Open(
+ "",
+ x =>
+ @
+
+ Пожалуйста, подождите...
+ ,
+ new DialogOptions()
+ {
+ ShowTitle = false,
+ Style = "min-height:auto;min-width:auto;width:auto",
+ CloseDialogOnEsc = false,
+ CssClass = ""
+ });
+ }
+
+ public void Hide()
+ {
+ DialogService.Close();
+ }
+}