diff --git a/Pds/Pds.Web/App.razor b/Pds/Pds.Web/App.razor index ab2e3cc..b22fbfd 100644 --- a/Pds/Pds.Web/App.razor +++ b/Pds/Pds.Web/App.razor @@ -1,4 +1,6 @@ - +@namespace Pds.Web + + diff --git a/Pds/Pds.Web/Pages/Settings/Brands/List.razor b/Pds/Pds.Web/Pages/Settings/Brands/List.razor index 480f7fc..f446d77 100644 --- a/Pds/Pds.Web/Pages/Settings/Brands/List.razor +++ b/Pds/Pds.Web/Pages/Settings/Brands/List.razor @@ -9,6 +9,8 @@ @inject IApiClient ApiClient @inject IAccessTokenProvider TokenProvider +@inject Blazored.LocalStorage.ILocalStorageService localStorage +@inject IJSRuntime JsRuntime @WithSuffix("Бренды") @@ -101,6 +103,7 @@ else
+
} @@ -122,4 +125,14 @@ else { return await ApiClient.Get(TokenProvider, "brands"); } + + private async Task OnClearLocalStorageAsync() + { + var confirmed = await JsRuntime.InvokeAsync("confirm", "Вы уверены, что хотите очистить localStorage?"); + if (confirmed) + { + await localStorage.ClearAsync(); + await JsRuntime.InvokeVoidAsync("location.reload"); + } + } } \ No newline at end of file diff --git a/Pds/Pds.Web/Pds.Web.csproj b/Pds/Pds.Web/Pds.Web.csproj index 2999335..05480c0 100644 --- a/Pds/Pds.Web/Pds.Web.csproj +++ b/Pds/Pds.Web/Pds.Web.csproj @@ -5,6 +5,7 @@ disable enable Linux + Pds.Web