mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-08 12:04:50 +08:00
feat: webview geetest (#1342)
* feat: webview geetest * opt: geetest * fix: linux * remove pwd mobile check * fix linux check
This commit is contained in:
committed by
GitHub
parent
ee8af925be
commit
e3e6bb0e39
@@ -1,3 +1,4 @@
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
@@ -30,7 +31,6 @@ class _LoginPageState extends State<LoginPage> {
|
||||
// 二维码生成时间
|
||||
bool showPassword = false;
|
||||
GlobalKey globalKey = GlobalKey();
|
||||
bool get isMobile => kDebugMode || Utils.isMobile;
|
||||
|
||||
Widget loginByQRCode(ThemeData theme) {
|
||||
return Column(
|
||||
@@ -75,7 +75,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
icon: const Icon(Icons.save),
|
||||
label: const Text('保存至相册'),
|
||||
),
|
||||
if (isMobile)
|
||||
if (kDebugMode || Utils.isMobile)
|
||||
TextButton.icon(
|
||||
onPressed: () => PageUtils.launchURL(
|
||||
_loginPageCtr.codeInfo.value.data.url,
|
||||
@@ -374,7 +374,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
Builder(
|
||||
builder: (context) {
|
||||
return PopupMenuButton(
|
||||
enabled: isMobile,
|
||||
enabled: !Platform.isLinux,
|
||||
padding: EdgeInsets.zero,
|
||||
tooltip:
|
||||
'选择国际冠码,'
|
||||
@@ -423,7 +423,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
enabled: isMobile,
|
||||
enabled: !Platform.isLinux,
|
||||
controller: _loginPageCtr.telTextController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
@@ -455,7 +455,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextField(
|
||||
enabled: isMobile,
|
||||
enabled: !Platform.isLinux,
|
||||
controller: _loginPageCtr.smsCodeTextController,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.sms_outlined),
|
||||
@@ -470,10 +470,10 @@ class _LoginPageState extends State<LoginPage> {
|
||||
),
|
||||
Obx(
|
||||
() => TextButton.icon(
|
||||
onPressed: isMobile
|
||||
? (_loginPageCtr.smsSendCooldown > 0
|
||||
onPressed: !Platform.isLinux
|
||||
? _loginPageCtr.smsSendCooldown > 0
|
||||
? null
|
||||
: _loginPageCtr.sendSmsCode)
|
||||
: _loginPageCtr.sendSmsCode
|
||||
: null,
|
||||
icon: const Icon(Icons.send),
|
||||
label: Text(
|
||||
@@ -489,7 +489,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
OutlinedButton.icon(
|
||||
onPressed: isMobile ? _loginPageCtr.loginBySmsCode : null,
|
||||
onPressed: !Platform.isLinux ? _loginPageCtr.loginBySmsCode : null,
|
||||
icon: const Icon(Icons.login),
|
||||
label: const Text('登录'),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user