1
0
mirror of synced 2025-01-30 03:47:28 +01:00
TaikoLocalServer/TaikoWebUI/Pages/ChangePassword.razor
shiibe 5a144f8ce6 Misc. UI changes/fixes
* Consistent heading sizes for all pages

* Swap any heading tags to `MudText` components

* Only show password options if login is required
2024-03-08 03:06:08 -05:00

48 lines
2.5 KiB
Plaintext

@inject HttpClient Client
@inject IDialogService DialogService
@inject LoginService LoginService
@inject NavigationManager NavigationManager
@page "/Users/ChangePassword"
<MudText Typo="Typo.h4" Class="mb-4">Change Password</MudText>
@if (LoginService.OnlyAdmin || !LoginService.LoginRequired)
{
<MudText Typo="Typo.body1">Changing password is turned off.</MudText>
}
else
{
<MudContainer>
<MudGrid Justify="Justify.Center">
<MudItem xs="12" md="6" lg="4" class="mt-8">
<MudCard>
<MudCardContent>
<MudForm @ref="changePasswordForm">
<MudText Typo="Typo.h4" Align="Align.Center">Change Password</MudText>
<MudTextField @bind-value="cardNum" InputType="InputType.Text" T="string"
FullWidth="true" Required="@true" RequiredError="Access code is required"
Label="Access Code"/>
<MudTextField @bind-Value="oldPassword" InputType="InputType.Password"
T="string" FullWidth="true" Required="@true"
RequiredError="Old Password is required"
Label="Old Password">
</MudTextField>
<MudTextField @bind-Value="newPassword" InputType="InputType.Password"
T="string" FullWidth="true" Required="@true"
RequiredError="Password is required"
Label="New Password">
</MudTextField>
<MudTextField @bind-Value="confirmNewPassword" InputType="InputType.Password"
T="string" FullWidth="true" Required="@true"
RequiredError="Confirm password is required"
Label="Confirm New Password">
</MudTextField>
<MudButton OnClick="OnChangePassword" FullWidth="true" Class="mt-3" StartIcon="@Icons.Material.Filled.Edit" Color="Color.Primary" Variant="Variant.Filled">Change password</MudButton>
</MudForm>
</MudCardContent>
</MudCard>
</MudItem>
</MudGrid>
</MudContainer>
}