3131 Label =" @(Lang[" HideMouseCursor " ])"
3232 Color =" Color.Primary" />
3333
34- <div class =" d-flex align-center" >
35- <MudSwitch @bind-Value =" @(AppSettings.EnablePasswordBox)"
36- @bind-Value:after =" SaveSettings"
37- Label =" @(Lang[" EnablePasswordBox " ])"
38- Color =" Color.Primary" />
39- @if (! AppSettings .EnablePasswordBox )
40- {
41- <MudChip T =" string"
42- Label =" true"
43- Icon =" @Icons.Material.Filled.WarningAmber"
44- IconColor =" Color.Primary"
45- DisableRipple =" true"
46- Size =" Size.Small" >
47- @( Lang [" EnablePasswordBoxTips" ])
48- </MudChip >
49- }
50- </div >
51-
52- <MudSwitch @bind-Value =" @(AppSettings.IsHidePasswordWindow)"
53- @bind-Value:after =" SaveSettings"
54- Class =" ml-6"
55- Disabled =" @(!AppSettings.EnablePasswordBox)"
56- Label =" @(Lang[" HidePasswordWindow " ])"
57- Color =" Color.Primary" />
58-
59- <MudSwitch @bind-Value =" @(_keyboardDownChecked)"
60- @bind-Value:after =" KeyboardDownChecked"
61- Class =" ml-6"
62- Disabled =" @(!AppSettings.EnablePasswordBox)"
63- Label =" @(Lang[" KeyboardDownActivePwd " ])"
64- Color =" Color.Primary" />
65-
66- <MudSwitch @bind-Value =" @(_mouseDownChecked)"
67- @bind-Value:after =" MouseDownChecked"
68- Class =" ml-6"
69- Disabled =" @(!AppSettings.EnablePasswordBox)"
70- Label =" @(Lang[" MouseDownActivePwd " ])"
71- Color =" Color.Primary" />
72-
73- <MudSelect T =" ScreenLocationEnum"
74- Label =" @(Lang[" PwdLocation " ])"
75- Variant =" Variant.Outlined"
76- Value =" @(AppSettings.PasswordInputLocation)"
77- Disabled =" @(!AppSettings.EnablePasswordBox)"
78- Class =" ml-6"
79- ValueChanged =" PwdBoxLocationChanged"
80- Margin =" Margin.Dense"
81- Dense =" true" >
82- <MudSelectItem Value =" @(ScreenLocationEnum.Center)" >@( Lang [" Center" ]) </MudSelectItem >
83- <MudSelectItem Value =" @(ScreenLocationEnum.TopLeft)" >@( Lang [" TopLeft" ]) </MudSelectItem >
84- <MudSelectItem Value =" @(ScreenLocationEnum.TopRight)" >@( Lang [" TopRight" ]) </MudSelectItem >
85- <MudSelectItem Value =" @(ScreenLocationEnum.BottomLeft)" >@( Lang [" BottomLeft" ]) </MudSelectItem >
86- <MudSelectItem Value =" @(ScreenLocationEnum.BottomRight)" >@( Lang [" BottomRight" ]) </MudSelectItem >
87- </MudSelect >
88-
8934 <MudSwitch @bind-Value =" @(AppSettings.LockAnimation)"
9035 @bind-Value:after =" SaveSettings"
9136 Label =" @(Lang[" LockAnimation " ])"
@@ -96,35 +41,111 @@ else
9641 Value =" @(AppSettings.AutoLockMinute)"
9742 Margin =" Margin.Dense"
9843 Min =" 0"
99- Class =" mt-2"
10044 Variant =" Variant.Outlined"
10145 ValueChanged =" AutoLockChanged" >
10246 </MudNumericField >
10347
104- <MudPaper Class =" d-flex justify-space-between mt-4" Elevation =" 0" >
105- <MudPaper Class =" d-flex align-center" Elevation =" 0" >
106- <MudText Typo =" Typo.button" >@( Lang [" LockShortcutKey" ]) </MudText >
107- <MudButton Class =" ml-3"
108- Size =" Size.Small"
109- Color =" Color.Primary"
110- OnClick =" SetShortcutKey" >
111- @( _shortcutKeyText )
112- </MudButton >
113- @if (AppSettings .ShortcutKeyForLock .IsNotEmpty ())
114- {
115- <MudTooltip Text =" @(Lang[" DeleteShortcutKeys " ])" Delay =" 600" >
116- <MudIconButton Icon =" @Icons.Material.Filled.Delete"
117- Size =" Size.Small"
118- OnClick =" ClearShortcutKey" />
119- </MudTooltip >
120- }
121- </MudPaper >
122-
123- <MudButton Color =" Color.Primary"
124- StartIcon =" @Icons.Material.Filled.VpnKey"
125- IconSize =" Size.Small"
126- OnClick =" ResetPassword" >
127- @( Lang [" ResetPassword" ])
48+ <MudPaper Class =" d-flex align-center" Elevation =" 0" >
49+ <MudText Typo =" Typo.button" >@( Lang [" LockShortcutKey" ]) </MudText >
50+ <MudButton Class =" ml-3"
51+ Size =" Size.Small"
52+ Color =" Color.Primary"
53+ OnClick =" SetShortcutKey" >
54+ @( _shortcutKeyText )
12855 </MudButton >
56+ @if (AppSettings .ShortcutKeyForLock .IsNotEmpty ())
57+ {
58+ <MudTooltip Text =" @(Lang[" DeleteShortcutKeys " ])" Delay =" 600" >
59+ <MudIconButton Icon =" @Icons.Material.Filled.Delete"
60+ Size =" Size.Small"
61+ OnClick =" ClearShortcutKey" />
62+ </MudTooltip >
63+ }
64+ </MudPaper >
65+
66+ <MudToggleGroup @bind-Value =" @(AppSettings.ScreenUnlockMethod)"
67+ @bind-Value:after =" SaveSettings"
68+ T =" ScreenUnlockMethods"
69+ SelectionMode =" SelectionMode.SingleSelection"
70+ Class =" mt-2"
71+ Color =" Color.Primary"
72+ Size =" Size.Small"
73+ CheckMark
74+ FixedContent >
75+ <MudToggleItem Value =" @(ScreenUnlockMethods.Password)" Text =" @(ScreenUnlockMethods.Password.GetDescription())" />
76+ <MudToggleItem Value =" @(ScreenUnlockMethods.Hotkey)" Text =" @(ScreenUnlockMethods.Hotkey.GetDescription())" />
77+ </MudToggleGroup >
78+
79+ <MudPaper Elevation =" 0" Height =" 210px" >
80+
81+ @if (AppSettings .ScreenUnlockMethod == ScreenUnlockMethods .Password )
82+ {
83+ <div class =" d-flex align-center" >
84+ <MudSwitch @bind-Value =" @(AppSettings.EnablePasswordBox)"
85+ @bind-Value:after =" SaveSettings"
86+ Label =" @(Lang[" EnablePasswordBox " ])"
87+ Color =" Color.Primary" />
88+ @if (! AppSettings .EnablePasswordBox )
89+ {
90+ <MudChip T =" string"
91+ Label =" true"
92+ Icon =" @Icons.Material.Filled.WarningAmber"
93+ IconColor =" Color.Primary"
94+ DisableRipple =" true"
95+ Size =" Size.Small" >
96+ @( Lang [" EnablePasswordBoxTips" ])
97+ </MudChip >
98+ }
99+ </div >
100+
101+ <MudSwitch @bind-Value =" @(AppSettings.IsHidePasswordWindow)"
102+ @bind-Value:after =" SaveSettings"
103+ Class =" ml-6"
104+ Disabled =" @(!AppSettings.EnablePasswordBox)"
105+ Label =" @(Lang[" HidePasswordWindow " ])"
106+ Color =" Color.Primary" />
107+
108+ <MudSwitch @bind-Value =" @(_keyboardDownChecked)"
109+ @bind-Value:after =" KeyboardDownChecked"
110+ Class =" ml-6"
111+ Disabled =" @(!AppSettings.EnablePasswordBox)"
112+ Label =" @(Lang[" KeyboardDownActivePwd " ])"
113+ Color =" Color.Primary" />
114+
115+ <MudSwitch @bind-Value =" @(_mouseDownChecked)"
116+ @bind-Value:after =" MouseDownChecked"
117+ Class =" ml-6"
118+ Disabled =" @(!AppSettings.EnablePasswordBox)"
119+ Label =" @(Lang[" MouseDownActivePwd " ])"
120+ Color =" Color.Primary" />
121+
122+ <MudSelect T =" ScreenLocationEnum"
123+ Label =" @(Lang[" PwdLocation " ])"
124+ Variant =" Variant.Outlined"
125+ Value =" @(AppSettings.PasswordInputLocation)"
126+ Disabled =" @(!AppSettings.EnablePasswordBox)"
127+ Class =" ml-6"
128+ ValueChanged =" PwdBoxLocationChanged"
129+ Margin =" Margin.Dense"
130+ Dense =" true" >
131+ <MudSelectItem Value =" @(ScreenLocationEnum.Center)" >@( Lang [" Center" ]) </MudSelectItem >
132+ <MudSelectItem Value =" @(ScreenLocationEnum.TopLeft)" >@( Lang [" TopLeft" ]) </MudSelectItem >
133+ <MudSelectItem Value =" @(ScreenLocationEnum.TopRight)" >@( Lang [" TopRight" ]) </MudSelectItem >
134+ <MudSelectItem Value =" @(ScreenLocationEnum.BottomLeft)" >@( Lang [" BottomLeft" ]) </MudSelectItem >
135+ <MudSelectItem Value =" @(ScreenLocationEnum.BottomRight)" >@( Lang [" BottomRight" ]) </MudSelectItem >
136+ </MudSelect >
137+
138+ <MudButton Color =" Color.Primary"
139+ StartIcon =" @Icons.Material.Filled.VpnKey"
140+ IconSize =" Size.Small"
141+ OnClick =" ResetPassword" >
142+ @( Lang [" ResetPassword" ])
143+ </MudButton >
144+ }
145+ else if (AppSettings .ScreenUnlockMethod == ScreenUnlockMethods .Hotkey )
146+ {
147+ <MudAlert Severity =" Severity.Success" >当前不支持自定义快捷键,解锁和锁屏快捷键相同</MudAlert >
148+ <MudAlert Severity =" Severity.Error" >如果使用此选项,请确保已经设置了快捷键,否则会无法解锁!!(后续可能会加入适当校验)</MudAlert >
149+ }
129150 </MudPaper >
130151}
0 commit comments