mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-24 12:30:12 +08:00
allow desktop login by pwd
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -191,7 +191,6 @@ class _LoginPageState extends State<LoginPage> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||
child: TextField(
|
||||
enabled: isMobile,
|
||||
controller: _loginPageCtr.usernameTextController,
|
||||
inputFormatters: [FilteringTextInputFormatter.deny(RegExp(r"\s"))],
|
||||
decoration: InputDecoration(
|
||||
@@ -209,7 +208,6 @@ class _LoginPageState extends State<LoginPage> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||
child: TextField(
|
||||
enabled: isMobile,
|
||||
obscureText: !showPassword,
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
inputFormatters: [FilteringTextInputFormatter.deny(RegExp(r"\s"))],
|
||||
@@ -231,9 +229,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
const SizedBox(width: 10),
|
||||
Checkbox(
|
||||
value: showPassword,
|
||||
onChanged: isMobile
|
||||
? (value) => setState(() => showPassword = value!)
|
||||
: null,
|
||||
onChanged: (value) => setState(() => showPassword = value!),
|
||||
),
|
||||
const Text('显示密码'),
|
||||
const Spacer(),
|
||||
@@ -312,7 +308,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
],
|
||||
),
|
||||
OutlinedButton.icon(
|
||||
onPressed: isMobile ? _loginPageCtr.loginByPassword : null,
|
||||
onPressed: _loginPageCtr.loginByPassword,
|
||||
icon: const Icon(Icons.login),
|
||||
label: const Text('登录'),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user