diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index 811be8c1..e5f2ae84 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -806,5 +806,6 @@ "同意":"agree", "已开通":"Have opened", "该功能是高级功能,请开通后再使用":"This function is an advanced function. Please enable it before using it", - "常用程序":"Common Programs" + "常用程序":"Common Programs", + "该锁已被重置":"The lock has been reset" } diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index 3f898ed2..1d277fc9 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -805,5 +805,6 @@ "同意":"同意", "已开通":"已开通", "该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用", - "常用程序":"常用程序" + "常用程序":"常用程序", + "该锁已被重置":"该锁已被重置" } diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 2ab7523f..978de8f5 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -808,5 +808,6 @@ "同意":"同意", "已开通":"已开通", "该功能是高级功能,请开通后再使用":"该功能是高级功能,请开通后再使用", - "常用程序":"常用程序" + "常用程序":"常用程序", + "该锁已被重置":"该锁已被重置" } diff --git a/star_lock/lib/blue/blue_manage.dart b/star_lock/lib/blue/blue_manage.dart index 40f196c7..0c34dd25 100644 --- a/star_lock/lib/blue/blue_manage.dart +++ b/star_lock/lib/blue/blue_manage.dart @@ -391,7 +391,7 @@ class BlueManage { if ((scanResult!.advertisementData.serviceUuids[0].toString()[31] == "0") && isAddEquipment == false) { connectStateCallBack(BluetoothConnectionState.disconnected); - EasyLoading.showToast("该锁已被重置", duration: 2000.milliseconds); + EasyLoading.showToast("该锁已被重置".tr, duration: 2000.milliseconds); return; } diff --git a/star_lock/lib/login/login/starLock_login_xhj_page.dart b/star_lock/lib/login/login/starLock_login_xhj_page.dart index 15ac2e42..14f7b99a 100644 --- a/star_lock/lib/login/login/starLock_login_xhj_page.dart +++ b/star_lock/lib/login/login/starLock_login_xhj_page.dart @@ -23,7 +23,9 @@ class StarLockLoginXHJPage extends StatefulWidget { class _StarLockLoginPageState extends State { final logic = Get.put(StarLockLoginLogic()); - final state = Get.find().state; + final state = Get + .find() + .state; @override Widget build(BuildContext context) { @@ -65,11 +67,14 @@ class _StarLockLoginPageState extends State { SizedBox( width: 40.w, ), - Text( - '${state.countryName.value} +${state.countryCode.value}', - style: TextStyle( - fontSize: 22.sp, color: AppColors.mainColor), - ) + Obx(() { + return Text( + '${state.countryName.value} +${state.countryCode + .value}', + style: TextStyle( + fontSize: 22.sp, color: AppColors.mainColor), + ); + }) ], ), ), @@ -109,7 +114,8 @@ class _StarLockLoginPageState extends State { ), ), label: - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", + "${TranslationLoader.lanKeys!.pleaseEnter! + .tr}${TranslationLoader.lanKeys!.password!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), @@ -125,83 +131,90 @@ class _StarLockLoginPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Obx( - () => Container( - padding: EdgeInsets.only( - left: 5.w, - right: 10.w, - ), - child: Image.asset( - state.agree.value - ? 'images/icon_round_select.png' - : 'images/icon_round_unSelect.png', - width: 20.w, - height: 20.w, - ), - ), + () => + Container( + padding: EdgeInsets.only( + left: 5.w, + right: 10.w, + ), + child: Image.asset( + state.agree.value + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', + width: 20.w, + height: 20.w, + ), + ), ), Flexible( child: RichText( text: TextSpan( - text: TranslationLoader.lanKeys!.readAndAgree!.tr, - style: TextStyle( - color: const Color(0xff333333), fontSize: 20.sp), - children: [ - WidgetSpan( - alignment: PlaceholderAlignment.middle, - child: GestureDetector( - child: Text( - '《${TranslationLoader.lanKeys!.userAgreement!.tr}》', - style: TextStyle( - color: AppColors.mainColor, - fontSize: 20.sp)), - onTap: () { - Get.toNamed(Routers.webviewShowPage, - arguments: { - "url": XSConstantMacro.userAgreementURL, - "title": '用户协议'.tr - }); - }, - )), - WidgetSpan( - alignment: PlaceholderAlignment.middle, - child: GestureDetector( - child: Text( - '《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》', - style: TextStyle( - color: AppColors.mainColor, - fontSize: 20.sp)), - onTap: () { - Get.toNamed(Routers.webviewShowPage, - arguments: { - "url": XSConstantMacro.privacyPolicyURL, - "title": '隐私政策'.tr - }); - }, - )), - ], - )), + text: TranslationLoader.lanKeys!.readAndAgree!.tr, + style: TextStyle( + color: const Color(0xff333333), + fontSize: 20.sp), + children: [ + WidgetSpan( + alignment: PlaceholderAlignment.middle, + child: GestureDetector( + child: Text( + '《${TranslationLoader.lanKeys! + .userAgreement!.tr}》', + style: TextStyle( + color: AppColors.mainColor, + fontSize: 20.sp)), + onTap: () { + Get.toNamed(Routers.webviewShowPage, + arguments: { + "url": XSConstantMacro + .userAgreementURL, + "title": '用户协议'.tr + }); + }, + )), + WidgetSpan( + alignment: PlaceholderAlignment.middle, + child: GestureDetector( + child: Text( + '《${TranslationLoader.lanKeys! + .privacyPolicy!.tr}》', + style: TextStyle( + color: AppColors.mainColor, + fontSize: 20.sp)), + onTap: () { + Get.toNamed(Routers.webviewShowPage, + arguments: { + "url": XSConstantMacro + .privacyPolicyURL, + "title": '隐私政策'.tr + }); + }, + )), + ], + )), ) ], ), ), ), SizedBox(height: 15.w), - Obx(() => SubmitBtn( - btnName: TranslationLoader.lanKeys!.login!.tr, - fontSize: 28.sp, - borderRadius: 20.w, - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - isDisabled: state.canNext.value, - onClick: state.canNext.value - ? () { - if (state.agree.value == false) { - logic.showToast('请先同意用户协议及隐私政策'.tr); - return; - } else { - logic.login(); - } + Obx(() => + SubmitBtn( + btnName: TranslationLoader.lanKeys!.login!.tr, + fontSize: 28.sp, + borderRadius: 20.w, + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + isDisabled: state.canNext.value, + onClick: state.canNext.value + ? () { + if (state.agree.value == false) { + logic.showToast('请先同意用户协议及隐私政策'.tr); + return; + } else { + logic.login(); } - : null)), + } + : null)), SizedBox(height: 10.h), ElevatedButton( onPressed: () async { @@ -243,41 +256,40 @@ class _StarLockLoginPageState extends State { ), Expanded( child: SizedBox( - width: 10.sp, - )), + width: 10.sp, + )), F.isLite ? Container() : GestureDetector( - child: SizedBox( - // width: 150.w, - height: 50.h, - // color: Colors.red, - child: Center( - child: Text('演示模式'.tr, - style: TextStyle( - fontSize: 22.sp, - color: AppColors.mainColor)), - ), - ), - onTap: () { - Get.toNamed(Routers.demoModeLockDetailPage); - }, - ) + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text('演示模式'.tr, + style: TextStyle( + fontSize: 22.sp, + color: AppColors.mainColor)), + ), + ), + onTap: () { + Get.toNamed(Routers.demoModeLockDetailPage); + }, + ) ], ), ], )); } - Widget loginInput( - {TextEditingController? controller, - List? inputFormatters, - String? hintText, - bool? isHaveLeftWidget, - Widget? leftWidget, - String? label, - bool? isPwd, - BlockStrCallback? onchangeAction}) { + Widget loginInput({TextEditingController? controller, + List? inputFormatters, + String? hintText, + bool? isHaveLeftWidget, + Widget? leftWidget, + String? label, + bool? isPwd, + BlockStrCallback? onchangeAction}) { return Container( width: 1.sp, child: Column( diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart index b61e14f1..e47dba72 100644 --- a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart @@ -39,49 +39,51 @@ class _MinePersonInfoPageState extends State { : null, body: Column( children: [ - Container( - width: 1.sw, - height: 0.2.sw, - margin: EdgeInsets.symmetric(horizontal: 15.w), - padding: EdgeInsets.symmetric(horizontal: 25.w), - decoration: BoxDecoration( - image: const DecorationImage( - image: AssetImage('images/xhj_main_bg.jpg'), - fit: BoxFit.cover, - ), - borderRadius: BorderRadius.circular(20.r), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.15), - offset: const Offset(0, 0), - blurRadius: 10.r, - spreadRadius: 0, - ), - ], - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - '系统设置', - style: TextStyle( - color: AppColors.blackColor, - fontSize: 28.sp, - fontWeight: FontWeight.w600, - ), - ), - Text( - '系统的全局配置在此项内进行设置', - style: TextStyle( - color: AppColors.blackColor.withOpacity(0.6), - fontSize: 20.sp, - fontWeight: FontWeight.w600, - ), - ), - ], - ), - ), + F.sw( + defaultCall: () => SizedBox(), + xhjCall: () => Container( + width: 1.sw, + height: 0.2.sw, + margin: EdgeInsets.symmetric(horizontal: 15.w), + padding: EdgeInsets.symmetric(horizontal: 25.w), + decoration: BoxDecoration( + image: const DecorationImage( + image: AssetImage('images/xhj_main_bg.jpg'), + fit: BoxFit.cover, + ), + borderRadius: BorderRadius.circular(20.r), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + offset: const Offset(0, 0), + blurRadius: 10.r, + spreadRadius: 0, + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '系统设置', + style: TextStyle( + color: AppColors.blackColor, + fontSize: 28.sp, + fontWeight: FontWeight.w600, + ), + ), + Text( + '系统的全局配置在此项内进行设置', + style: TextStyle( + color: AppColors.blackColor.withOpacity(0.6), + fontSize: 20.sp, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + )), SizedBox( height: 20.h, ),