Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Refactor close popup (#578)
Leendert de Borst972505c174f1
diff --git a/src/AliasVault.Client/Main/Pages/Credentials/Home.razor b/src/AliasVault.Client/Main/Pages/Credentials/Home.razorindex 1dcc37287..9a18042d8 100644--- a/src/AliasVault.Client/Main/Pages/Credentials/Home.razor+++ b/src/AliasVault.Client/Main/Pages/Credentials/Home.razor@@ -24,14 +24,14 @@<div class="p-4"><div class="mb-4"><label class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">View Mode</label>- <select @bind="ViewMode" @bind:after="UpdateViewMode" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">+ <select @bind="ViewMode" @bind:after="CloseSettingsPopup" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"><option value="grid">Grid View</option><option value="table">Table View</option></select></div><div class="mb-4"><label class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Sort Order</label>- <select @bind="SortOrder" @bind:after="UpdateSortOrder" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">+ <select @bind="SortOrder" @bind:after="CloseSettingsPopup" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"><option value="asc">Oldest First</option><option value="desc">Newest First</option></select>@@ -121,31 +121,14 @@ else}/// <summary>- /// Updates the view mode.+ /// Closes the settings dropdown./// </summary>- private void UpdateViewMode()+ private async Task CloseSettingsPopup(){ShowSettingsDropdown = false;- StateHasChanged();- }- /// <summary>- /// Updates the sort order.- /// </summary>- private async Task UpdateSortOrder()- {- ShowSettingsDropdown = false;+ // Reload the credentials in case the settings were changed.await LoadCredentialsAsync();- StateHasChanged();- }-- /// <summary>- /// Closes the settings dropdown.- /// </summary>- private void CloseSettingsPopup()- {- ShowSettingsDropdown = false;- StateHasChanged();}/// <inheritdoc />