Shady nagy/blazor enhance (#429)
* - Using cdnjs not nuget on bootstrap and signalr. - Bootstrap modal used for add, edit details and delete. * EditForm inside modal-content * Top close button action added * Removed unused using. * DeleteCookies moved inside AuthService * ApplicationCore removed from BlazorAdmin dependencies * SecureHttpClient removed * Logout from identity manager added * last thing to do in logout from admin is LogoutIdentityManager. * JSRuntime used in AuthService without pass to the functions * Link fixed when logout from MVC
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
@using BlazorAdmin.Services
|
||||
@using BlazorAdmin.JavaScript
|
||||
|
||||
@inject AuthService Auth
|
||||
@inject AuthService Auth
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
@inherits BlazorAdmin.Helpers.BlazorLayoutComponent
|
||||
|
||||
<AuthorizeView Roles=@Microsoft.eShopWeb.ApplicationCore.Constants.AuthorizationConstants.Roles.ADMINISTRATORS>
|
||||
<AuthorizeView Roles=@Constants.Roles.ADMINISTRATORS>
|
||||
<div class="sidebar">
|
||||
<NavMenu />
|
||||
</div>
|
||||
@@ -28,7 +25,7 @@
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
await Auth.RefreshLoginInfoFromCookie(JSRuntime);
|
||||
await Auth.RefreshLoginInfoFromCookie();
|
||||
if (!Auth.IsLoggedIn)
|
||||
{
|
||||
await new Route(JSRuntime).RouteOutside("/Identity/Account/Login");
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@inject AuthService Auth
|
||||
@inherits BlazorAdmin.Helpers.BlazorComponent
|
||||
|
||||
@using BlazorAdmin.Services
|
||||
<div class="top-row pl-4 navbar navbar-dark">
|
||||
<a class="navbar-brand" href="">eShopOnWeb Admin</a>
|
||||
<button class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@inject NavigationManager Navigation
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
|
||||
|
||||
@code {
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Navigation.NavigateTo($"authentication/login?returnUrl=" +
|
||||
Navigation.NavigateTo($"Identity/Account/Login?returnUrl=" +
|
||||
Uri.EscapeDataString(Navigation.Uri));
|
||||
}
|
||||
}
|
||||
9
src/BlazorAdmin/Shared/Spinner.razor
Normal file
9
src/BlazorAdmin/Shared/Spinner.razor
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
@inherits BlazorAdmin.Helpers.BlazorComponent
|
||||
|
||||
@namespace BlazorAdmin.Shared
|
||||
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user