diff --git a/lan/lan_en.json b/lan/lan_en.json index 3f2b932f..2324a4de 100644 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -1088,5 +1088,6 @@ "购买记录": "Purchase record", "使用记录": "User Record", - "失效时间要大于当前时间": "The expiration time must be longer than the current time" + "失效时间要大于当前时间": "The expiration time must be longer than the current time", + "修改名字": "Edit name" } diff --git a/lan/lan_et.json b/lan/lan_et.json index 33cba887..296f1779 100644 --- a/lan/lan_et.json +++ b/lan/lan_et.json @@ -583,7 +583,7 @@ "虹膜": "Iiris", "手掌": "Palmi", "商城": "Kaubamaja", - "我的": "Minu...", + "我的": "Minu", "微信公众号推送": "Jutt avalik konto", "开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置": "Et avada häiresõnumite vastuvõtmiseks, peate esmalt tähelepanu Skye Smart Locki avalikule kontole, palun salvesta QR koodi ja kasuta seadistuste skaneerimiseks", "蓝牙": "BluetoothName", diff --git a/lan/lan_fi.json b/lan/lan_fi.json index 56b02ff1..bca1b2f4 100644 --- a/lan/lan_fi.json +++ b/lan/lan_fi.json @@ -583,7 +583,7 @@ "虹膜": "Iiris", "手掌": "Palmu", "商城": "Ostoskeskus", - "我的": "Minun...", + "我的": "Minun", "微信公众号推送": "Keskustele julkinen tili", "开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置": "Voidakseen avata keskustelua hälytysviestien vastaanottamiseksi sinun on kiinnitettävä huomiota Skye Smart Lockin julkiseen keskusteluun. Tallenna QR-koodi ja käytä keskustelua asetusten kartoittamiseen", "蓝牙": "BluetoothName", diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 8faee69d..1c0b0d7e 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -1088,5 +1088,6 @@ "购买记录": "购买记录", "使用记录": "使用记录", - "失效时间要大于当前时间": "失效时间要大于当前时间" + "失效时间要大于当前时间": "失效时间要大于当前时间", + "修改名字": "修改名字" } diff --git a/lan/lan_zh.json b/lan/lan_zh.json index 4c2f489d..a841f34b 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -1088,5 +1088,6 @@ "购买记录": "购买记录", "使用记录": "使用记录", - "失效时间要大于当前时间": "失效时间要大于当前时间" + "失效时间要大于当前时间": "失效时间要大于当前时间", + "修改名字": "修改名字" } diff --git a/lib/blue/sender_data.dart b/lib/blue/sender_data.dart index 04ae6da3..f77a55be 100755 --- a/lib/blue/sender_data.dart +++ b/lib/blue/sender_data.dart @@ -1,4 +1,3 @@ - import 'dart:async'; import '../app_settings/app_settings.dart'; @@ -31,7 +30,9 @@ class CommandSenderManager { List dataBeforeAddTheUser = []; void _initLockAddUserSucceedEvent() { // 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus - _passCurrentLockInformationEvent = eventBus.on().listen((LockAddUserSucceedEvent event) { + _passCurrentLockInformationEvent = eventBus + .on() + .listen((LockAddUserSucceedEvent event) { if (event.type == 0) { sendNormalData(dataBeforeAddTheUser); } else { @@ -44,7 +45,8 @@ class CommandSenderManager { List dataTransferSmartLock = []; void _initTransferSmartLockSucceedEvent() { // 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus - _transferSmartLockEvent = eventBus.on().listen((LockInitUserNoEvent event) { + _transferSmartLockEvent = + eventBus.on().listen((LockInitUserNoEvent event) { sendNormalData(dataTransferSmartLock); }); } @@ -69,8 +71,9 @@ class CommandSenderManager { sendNormalData(value); } else { // 当前锁被转移了 需要更新锁的userid 调用转移锁协议 - if(CommonDataManage().initUserNo == 1){ - final List entity = await SenderBeforeDataManage().getTransferSmartLockData(); + if (CommonDataManage().initUserNo == 1) { + final List entity = + await SenderBeforeDataManage().getTransferSmartLockData(); sendNormalData(entity); dataTransferSmartLock = value; return; @@ -78,7 +81,8 @@ class CommandSenderManager { // 添加用户之后调用协议就要判断是否添加用户 if (CommonDataManage().currentLockUserNo == 0) { // 如果LockUserNo为0,先添加用户 - final List entity = await SenderBeforeDataManage().getAddUserKeyData(); + final List entity = + await SenderBeforeDataManage().getAddUserKeyData(); sendNormalData(entity); dataBeforeAddTheUser = value; } else { diff --git a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart index 815bfe10..c88e7740 100755 --- a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -37,8 +36,7 @@ class _CheckingInSetPageState extends State { body: Column( children: [ Obx(() => CommonItem( - leftTitel: - '公司名称'.tr, + leftTitel: '公司名称'.tr, rightTitle: state.companyName.value ?? '', // isHaveRightWidget: true, // rightWidget: getTFWidget(), @@ -53,44 +51,52 @@ class _CheckingInSetPageState extends State { isHaveLine: true, isHaveDirection: true, action: () { - Get.toNamed(Routers.checkingInStaffManagePage, arguments: { - 'getKeyInfosData': state.getKeyInfosData.value, - 'companyId': state.companyId.value - }); + Get.toNamed(Routers.checkingInStaffManagePage, + arguments: { + 'getKeyInfosData': state.getKeyInfosData.value, + 'companyId': state.companyId.value + }); })), Obx(() => CommonItem( leftTitel: '工作时间'.tr, - rightTitle: (state.beginTime.value.isNotEmpty) ? '${state.beginTime.value} - ${state.endTime.value}' : '', + rightTitle: (state.beginTime.value.isNotEmpty) + ? '${state.beginTime.value} - ${state.endTime.value}' + : '', isHaveLine: true, isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: { - // "getKeyInfosData": state.getKeyInfosData.value, - 'companyId': state.companyId.value, - 'pushType': '2', - 'checkingInSetInfo': state.checkingInSetInfo.value, - }); - if(data != null) { + var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, + arguments: { + // "getKeyInfosData": state.getKeyInfosData.value, + 'companyId': state.companyId.value, + 'pushType': '2', + 'checkingInSetInfo': state.checkingInSetInfo.value, + }); + if (data != null) { setState(logic.getCheckInSetInfoData); } })), Obx(() => CommonItem( leftTitel: '工作日设置'.tr, - rightTitle: state.isCustom.value == true ? state.weekDaysStr.value : (state.weekDays.value.length == 6 ? '单休' : '双休'), + rightTitle: state.isCustom.value == true + ? state.weekDaysStr.value + : (state.weekDays.value.length == 6 ? '单休'.tr : '双休'.tr), isHaveLine: true, isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: { - 'getKeyInfosData': state.getKeyInfosData.value, - 'companyId': state.companyId.value, - 'pushType': '2', - 'checkingInSetInfo': state.checkingInSetInfo.value, - }); - if(data != null) { + var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, + arguments: { + 'getKeyInfosData': state.getKeyInfosData.value, + 'companyId': state.companyId.value, + 'pushType': '2', + 'checkingInSetInfo': state.checkingInSetInfo.value, + }); + if (data != null) { state.isCustom.value = data['attendanceType']; state.weekDays.value = data['weekDays']; state.weekDaysStr.value = state.weekDays.join(','); - AppLog.log('state.weekDays.value:${state.weekDays.value} state.weekDaysStr.value:${state.weekDaysStr.value}'); + AppLog.log( + 'state.weekDays.value:${state.weekDays.value} state.weekDaysStr.value:${state.weekDaysStr.value}'); setState(() {}); } })), @@ -100,9 +106,10 @@ class _CheckingInSetPageState extends State { isHaveLine: false, isHaveDirection: true, action: () { - Get.toNamed(Routers.checkingInSetHolidaysPage, arguments: { - 'companyId': state.companyId.value - }); + Get.toNamed(Routers.checkingInSetHolidaysPage, + arguments: { + 'companyId': state.companyId.value + }); }), SizedBox( height: 30.h, @@ -117,7 +124,8 @@ class _CheckingInSetPageState extends State { margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), onClick: () { - ShowTipView().showIosTipWithContentDialog('是否删除?'.tr, logic.deletCompanyData); + ShowTipView().showIosTipWithContentDialog( + '是否删除?'.tr, logic.deletCompanyData); // showDeletCompanyAlertDialog(context); }), ), @@ -135,14 +143,14 @@ class _CheckingInSetPageState extends State { tipTitle: '', controller: state.changeNameController, inputFormatters: [ - LengthLimitingTextInputFormatter(30), + LengthLimitingTextInputFormatter(30), ], sureClick: () { - if(state.changeNameController.text.isEmpty){ + if (state.changeNameController.text.isEmpty) { logic.showToast('请输入公司名字'.tr); return; } - if(state.changeNameController.text.length <6){ + if (state.changeNameController.text.length < 6) { logic.showToast('公司名字长度不能小于 6 '.tr); return; } @@ -151,7 +159,8 @@ class _CheckingInSetPageState extends State { }, cancelClick: () { Get.back(); - },); + }, + ); }); } @@ -175,7 +184,8 @@ class _CheckingInSetPageState extends State { FilteringTextInputFormatter.deny('\n'), LengthLimitingTextInputFormatter(30), ], - style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), + style: TextStyle( + fontSize: 22.sp, color: AppColors.darkGrayTextColor), controller: state.nameController, autofocus: false, enabled: false, @@ -185,10 +195,18 @@ class _CheckingInSetPageState extends State { // contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), // hintText: state.companyName.value ?? "", hintStyle: TextStyle(fontSize: 22.sp), - focusedBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), - disabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), - enabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), - border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)), + focusedBorder: const OutlineInputBorder( + borderSide: + BorderSide(width: 0, color: Colors.transparent)), + disabledBorder: const OutlineInputBorder( + borderSide: + BorderSide(width: 0, color: Colors.transparent)), + enabledBorder: const OutlineInputBorder( + borderSide: + BorderSide(width: 0, color: Colors.transparent)), + border: const OutlineInputBorder( + borderSide: + BorderSide(width: 0, color: Colors.transparent)), contentPadding: const EdgeInsets.symmetric(vertical: 0), ), ), @@ -200,5 +218,4 @@ class _CheckingInSetPageState extends State { ), ); } - } diff --git a/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_state.dart b/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_state.dart index 498bcafa..4af10227 100755 --- a/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_state.dart +++ b/lib/main/lockDetail/lockSet/faceUnlock/faceUnlock_state.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -6,7 +5,6 @@ import 'package:star_lock/app_settings/app_colors.dart'; import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart'; class FaceUnlockState { - FaceUnlockState() { Map map = Get.arguments; if (map['lockSetInfoData'] != null) { @@ -14,25 +12,26 @@ class FaceUnlockState { faceOn.value = lockSetInfoData.value.lockSettingInfo!.faceSwitch != 0; // autoBright.value = lockSetInfoData.value.lockSettingInfo!.faceAutoLightScreen != 0; - switch(lockSetInfoData.value.lockSettingInfo!.faceInductionDistance!){ + switch (lockSetInfoData.value.lockSettingInfo!.faceInductionDistance!) { case 1: - senseDistance.value = '近距离'; + senseDistance.value = '近距离'.tr; break; case 2: - senseDistance.value = '中距离'; + senseDistance.value = '中距离'.tr; break; case 3: senseDistance.value = '远距离'.tr; break; case 0: - senseDistance.value = '关闭'; + senseDistance.value = '关闭'.tr; break; } - antiMisoperation.value = lockSetInfoData.value.lockSettingInfo!.faceEnErrUnlock!; + antiMisoperation.value = + lockSetInfoData.value.lockSettingInfo!.faceEnErrUnlock!; } - for(int i = 0; i < 31; i++) { + for (int i = 0; i < 31; i++) { antiMisoperationStrList.add(i.toString() + '秒'.tr); } } @@ -43,12 +42,8 @@ class FaceUnlockState { // RxBool autoBright = false.obs; //自动亮屏 RxString senseDistance = '远距离'.tr.obs; //感应距离 RxInt antiMisoperation = 0.obs; //防误开 - RxList senseDistanceList = [ - '远距离'.tr, - '中距离'.tr, - '近距离'.tr, - '关闭'.tr - ].obs; + RxList senseDistanceList = + ['远距离'.tr, '中距离'.tr, '近距离'.tr, '关闭'.tr].obs; // RxList antiMisoperationList = [0, 5, 10, 15, 30, 60].obs; RxList antiMisoperationStrList = [].obs; @@ -62,12 +57,8 @@ class FaceUnlockState { TextStyle(color: AppColors.placeholderTextColor, fontSize: 22.sp); late InlineSpan tipsPreviewSpan = TextSpan(children: [ - TextSpan( - text: '${"添加和使用面容开锁时".tr}:\n', - style: titleStyle), - TextSpan( - text: '添加和使用面容开锁时提示'.tr, - style: subTipsStyle), + TextSpan(text: '${"添加和使用面容开锁时".tr}:\n', style: titleStyle), + TextSpan(text: '添加和使用面容开锁时提示'.tr, style: subTipsStyle), ]); RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示