Skip to content

Commit

Permalink
将设置密码功能调整为修改密码
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuLing-zhang committed Oct 11, 2024
1 parent 05c0912 commit 157711c
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/ComputerLock/Components/ResetPassword.razor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using DialogResult = MudBlazor.DialogResult;

namespace ComputerLock.Components;
public partial class SetPassword
public partial class ResetPassword
{
[CascadingParameter]
private MudDialogInstance MudDialog { get; set; } = default!;
Expand Down
4 changes: 2 additions & 2 deletions src/ComputerLock/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
<MudButton Color="Color.Primary"
StartIcon="@Icons.Material.Filled.VpnKey"
IconSize="Size.Small"
OnClick="SetPassword">
@(Lang["SetPassword"])
OnClick="ResetPassword">
@(Lang["ResetPassword"])
</MudButton>
</MudTooltip>
</MudPaper>
4 changes: 2 additions & 2 deletions src/ComputerLock/Pages/Index.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ public void UnregisterHotKey()
_shortcutKeyText = Lang["Invalid"];
}

private async Task SetPassword()
private async Task ResetPassword()
{
var noHeader = new DialogOptions()
{
BackgroundClass = "dialog-blurry",
CloseOnEscapeKey = false,
CloseButton = true
};
var dialog = await Dialog.ShowAsync<SetPassword>(Lang["SetPassword"], noHeader);
var dialog = await Dialog.ShowAsync<ResetPassword>(Lang["ResetPassword"], noHeader);
var result = await dialog.Result;
if (result.Canceled)

Check warning on line 244 in src/ComputerLock/Pages/Index.razor.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
{
Expand Down
18 changes: 9 additions & 9 deletions src/ComputerLock/Resources/Lang.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/ComputerLock/Resources/Lang.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
<data name="PasswordTip" xml:space="preserve">
<value>Default password is 1</value>
</data>
<data name="SetPassword" xml:space="preserve">
<value>Set password</value>
<data name="ResetPassword" xml:space="preserve">
<value>Reset password</value>
</data>
<data name="CurrentPassword" xml:space="preserve">
<value>Current Password</value>
Expand Down
2 changes: 1 addition & 1 deletion src/ComputerLock/Resources/Lang.resx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<data name="PasswordTip" xml:space="preserve">
<value></value>
</data>
<data name="SetPassword" xml:space="preserve">
<data name="ResetPassword" xml:space="preserve">
<value></value>
</data>
<data name="CurrentPassword" xml:space="preserve">
Expand Down
4 changes: 2 additions & 2 deletions src/ComputerLock/Resources/Lang.zh.resx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
<data name="PasswordTip" xml:space="preserve">
<value>初始密码为1</value>
</data>
<data name="SetPassword" xml:space="preserve">
<value>设置密码</value>
<data name="ResetPassword" xml:space="preserve">
<value>修改密码</value>
</data>
<data name="CurrentPassword" xml:space="preserve">
<value>当前密码</value>
Expand Down

0 comments on commit 157711c

Please sign in to comment.