添加项目文件。
This commit is contained in:
26
TechHelper.Client/Shared/AccountLayout.razor
Normal file
26
TechHelper.Client/Shared/AccountLayout.razor
Normal file
@@ -0,0 +1,26 @@
|
||||
@inherits LayoutComponentBase
|
||||
@layout TechHelper.Client.Layout.MainLayout
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
|
||||
@if (authenticationStateTask is null)
|
||||
{
|
||||
<p>Loading...</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Body
|
||||
}
|
||||
|
||||
@code {
|
||||
[CascadingParameter]
|
||||
private Task<AuthenticationState> authenticationStateTask { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (authenticationStateTask is null)
|
||||
{
|
||||
NavigationManager.Refresh(forceReload: true);
|
||||
}
|
||||
}
|
||||
}
|
14
TechHelper.Client/Shared/ManageLayout.razor
Normal file
14
TechHelper.Client/Shared/ManageLayout.razor
Normal file
@@ -0,0 +1,14 @@
|
||||
@inherits LayoutComponentBase
|
||||
@layout AccountLayout
|
||||
|
||||
|
||||
<MudPaper Class="d-flex flex-column flex-grow-1">
|
||||
|
||||
<h1>Manage your account</h1>
|
||||
<h2>Change your account settings</h2>
|
||||
<MudDivider Class="flex-grow-0" />
|
||||
<MudStack Row="true">
|
||||
<ManageNavMenu />
|
||||
@Body
|
||||
</MudStack>
|
||||
</MudPaper>
|
22
TechHelper.Client/Shared/ManageNavMenu.razor
Normal file
22
TechHelper.Client/Shared/ManageNavMenu.razor
Normal file
@@ -0,0 +1,22 @@
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
|
||||
|
||||
<ul class="nav nav-pills flex-column">
|
||||
<li class="nav-item">
|
||||
<NavLink class="nav-link" href="Account/Manage" Match="NavLinkMatch.All">Profile</NavLink>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<NavLink class="nav-link" href="Account/Manage/Class">Class</NavLink>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<NavLink class="nav-link" href="Account/Manage/ChangePassword">Password</NavLink>
|
||||
</li>
|
||||
@* <li class="nav-item">
|
||||
<NavLink class="nav-link" href="Account/Manage/TwoFactorAuthentication">Two-factor authentication</NavLink>
|
||||
</li> *@
|
||||
</ul>
|
||||
|
||||
@code {
|
||||
private bool hasExternalLogins;
|
||||
|
||||
}
|
Reference in New Issue
Block a user