Updated some UI.

Updated app loading UI.

Updated UI for various authentication states.

Updated authentication buttons in the client.
This commit is contained in:
Harrison Deng 2021-05-23 14:15:38 -05:00
parent ac13a6352b
commit 549d9d7e99
4 changed files with 57 additions and 23 deletions

View File

@ -25,7 +25,16 @@
}
else
{
<p>Loading modules...</p>
<div class="d-flex flex-column align-items-center justify-content-center" style="width: 100vw; height: 100vh;">
<div class="my-1">
<div class="spinner-border text-success" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="my-1">
Downloading shop modules...
</div>
</div>
}
</Found>
<NotFound>

View File

@ -5,21 +5,25 @@
<RemoteAuthenticatorView Action="@Action">
<LoggingIn>
<div class="d-flex justify-content-center flex-column" style="width: 100%;">
<div class="spinner-border text-primary mx-auto my-2" role="status">
<span class="sr-only">Loading...</span>
<div class="d-flex flex-column align-items-center justify-content-center" style="width: 100%;">
<div class="my-1">
<div class="spinner-grow text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="mx-auto my-2">
<div class="my-1 text-muted">
Hang on just a sec. We're sending you to go login!
</div>
</div>
</LoggingIn>
<Registering>
<div class="d-flex justify-content-center flex-column" style="width: 100%;">
<div class="spinner-border text-primary mx-auto my-2" role="status">
<span class="sr-only">Loading...</span>
<div class="d-flex flex-column align-items-center justify-content-center" style="width: 100%;">
<div class="my-1">
<div class="spinner-grow text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="mx-auto my-2">
<div class="my-1 text-muted">
Hang on just a sec. We're sending you to go sign up!
</div>
</div>

View File

@ -29,19 +29,29 @@
</NavLink>
</li>
</ul>
<AuthorizeView Context="auth">
<Authorized>
<a href="authentication/profile">Hello, @auth.User.Identity.Name!</a>
<button class="nav-link btn btn-link" @onclick="BeginSignOut">Log out</button>
</Authorized>
<NotAuthorized>
@if (Configuration["IdentityServer:Registration"].Equals("enabled"))
{
<a class="mx-1" href="authentication/register">Register</a>
}
<a class="mx-1" href="authentication/login">Log in</a>
</NotAuthorized>
</AuthorizeView>
<ul class="navbar-nav ml-auto">
<AuthorizeView Context="auth">
<Authorized>
<li class="nav-item">
<a class="nav-link" href="authentication/profile">Hello, @auth.User.Identity.Name!</a>
</li>
<li class="nav-item">
<button class="nav-link btn btn-outline-primary" @onclick="BeginSignOut">Log out</button>
</li>
</Authorized>
<NotAuthorized>
@if (Configuration["IdentityServer:Registration"].Equals("enabled"))
{
<li class="nav-item">
<a class="nav-link" href="authentication/register">Register</a>
</li>
}
<li class="nav-item">
<a class="nav-link" href="authentication/login">Log in</a>
</li>
</NotAuthorized>
</AuthorizeView>
</ul>
</div>
</nav>

View File

@ -12,7 +12,18 @@
</head>
<body>
<div id="app">Loading...</div>
<div id="app">
<div class="d-flex flex-column align-items-center justify-content-center" style="width: 100vw; height: 100vh;">
<div class="my-1">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="my-1 text-muted">
Loading app...
</div>
</div>
</div>
<div id="blazor-error-ui">
An unhandled error has occurred.