修复指纹、卡、人脸,删除/重置之前校验是否有网络功能
This commit is contained in:
parent
51d4664d3c
commit
539cef3ac4
@ -16,6 +16,7 @@ import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'cardDetail_logic.dart';
|
||||
|
||||
class CardDetailPage extends StatefulWidget {
|
||||
@ -197,7 +198,10 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr, () async {
|
||||
state.isDeletCard.value = true;
|
||||
|
||||
@ -17,6 +17,7 @@ import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
import '../../fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||
import 'cardList_logic.dart';
|
||||
|
||||
@ -69,7 +70,10 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
onPressed: () async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'重置后,该锁的卡都将被删除哦,确认要重置吗?'.tr, () async {
|
||||
@ -142,7 +146,10 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
children: <Widget>[
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context) {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'确定要删除吗?'.tr, () async {
|
||||
|
||||
@ -17,6 +17,7 @@ import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
|
||||
class FaceDetailPage extends StatefulWidget {
|
||||
const FaceDetailPage({Key? key}) : super(key: key);
|
||||
@ -207,7 +208,10 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr,
|
||||
() async {
|
||||
|
||||
@ -18,6 +18,7 @@ import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'faceList_logic.dart';
|
||||
|
||||
class FaceListPage extends StatefulWidget {
|
||||
@ -67,7 +68,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
onPressed: () async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
// showDeletAlertDialog(context);
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
@ -181,6 +185,11 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
Widget _buildDeleteBtn(FingerprintItemData faceItemData) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 省略: 弹出是否删除的确认对话框。
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr, () async {
|
||||
state.isDeletAll = false;
|
||||
|
||||
@ -15,6 +15,7 @@ import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'fingerprintDetail_logic.dart';
|
||||
|
||||
class FingerprintDetailPage extends StatefulWidget {
|
||||
@ -211,7 +212,10 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr,
|
||||
() async {
|
||||
|
||||
@ -70,7 +70,10 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
||||
onPressed: () async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'重置后,该锁的指纹都将被删除哦,确认要重置吗?'.tr, () async {
|
||||
@ -141,8 +144,11 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
||||
extentRatio: 0.2,
|
||||
motion: const ScrollMotion(),
|
||||
children: <Widget>[
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context) {
|
||||
SlidableAction(onPressed: (BuildContext context) {
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'确定要删除吗?'.tr, () async {
|
||||
state.isDeletAll = false;
|
||||
|
||||
@ -19,6 +19,7 @@ import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
|
||||
class PasswordKeyDetailPage extends StatefulWidget {
|
||||
const PasswordKeyDetailPage({Key? key}) : super(key: key);
|
||||
@ -243,7 +244,10 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr, () {
|
||||
state.isDeletPasswordKey.value = true;
|
||||
|
||||
@ -68,11 +68,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
final bool? isDemoMode =
|
||||
await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
final bool isNetWork =
|
||||
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (state.itemDataList.isEmpty) {
|
||||
logic.showToast('暂无密码,无需重置'.tr);
|
||||
return;
|
||||
@ -155,7 +155,10 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
children: <Widget>[
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context) {
|
||||
logic.checkNetworkSituation();
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'确定要删除吗?'.tr, () async {
|
||||
|
||||
@ -177,13 +177,6 @@ class BaseGetXController extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
void checkNetworkSituation (){
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String getUseKeyTypeStr(int? startDate, int? endDate, int? keyType) {
|
||||
String useDateStr = '';
|
||||
if (keyType == XSConstantMacro.keyTypeTime) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user