From 860016cbf878438b86ee12ba20fe2f8df980e23a Mon Sep 17 00:00:00 2001 From: liyi Date: Tue, 26 Nov 2024 11:14:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/src/sky/res/values-en-rUS/string.xml | 2 +- .../app/src/sky/res/values-zh-rCN/string.xml | 2 +- .../app/src/xhj/res/values-zh-rCN/string.xml | 2 +- .../lockDetail/lockDetail_page.dart | 187 +++++++++--------- 4 files changed, 96 insertions(+), 97 deletions(-) diff --git a/android/app/src/sky/res/values-en-rUS/string.xml b/android/app/src/sky/res/values-en-rUS/string.xml index 7c497348..a99e9958 100644 --- a/android/app/src/sky/res/values-en-rUS/string.xml +++ b/android/app/src/sky/res/values-en-rUS/string.xml @@ -1,4 +1,4 @@ - Star Lock + TTLock Pro \ No newline at end of file diff --git a/android/app/src/sky/res/values-zh-rCN/string.xml b/android/app/src/sky/res/values-zh-rCN/string.xml index e55b995c..f366b5fc 100644 --- a/android/app/src/sky/res/values-zh-rCN/string.xml +++ b/android/app/src/sky/res/values-zh-rCN/string.xml @@ -1,4 +1,4 @@ - 星锁 + 锁通通 \ No newline at end of file diff --git a/android/app/src/xhj/res/values-zh-rCN/string.xml b/android/app/src/xhj/res/values-zh-rCN/string.xml index e55b995c..384ea2dd 100644 --- a/android/app/src/xhj/res/values-zh-rCN/string.xml +++ b/android/app/src/xhj/res/values-zh-rCN/string.xml @@ -1,4 +1,4 @@ - 星锁 + 星星锁 \ No newline at end of file diff --git a/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 9872cd6f..d5dbf200 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -748,109 +748,108 @@ class _LockDetailPageState extends State Widget adminInfoView( {bool center = true, bool max = true, bool add = false}) { - return Expanded( - child: Wrap( - children: [ - Row( - mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min, - children: [ - Image.asset( - 'images/icon_electronicKey_admin.png', + return Row( + mainAxisAlignment: + center ? MainAxisAlignment.center : MainAxisAlignment.start, + children: [ + Row( + mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min, + children: [ + Image.asset( + 'images/icon_electronicKey_admin.png', + width: 24.w, + height: 20.w, + color: AppColors.blackColor, //应根据状态显示(当前角色为超级管理员 应显示蓝色图标) + ), + SizedBox(width: 6.w), + Text( + state.keyInfos.value.isLockOwner == 1 + ? '超级管理员'.tr + : (state.keyInfos.value.keyRight == 1 + ? '授权管理员'.tr + : '普通用户'.tr), + style: TextStyle( + fontSize: 20.sp, color: AppColors.darkGrayTextColor), + ), + if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w), + ], + ), + Row( + mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min, + children: [ + FlavorsImg( + child: Image.asset( + state.keyInfos.value.hasGateway == 1 + ? 'images/main/icon_main_remoteUnlocking.png' + : 'images/main/icon_main_remoteUnlocking_grey.png', width: 24.w, height: 20.w, - color: AppColors.blackColor, //应根据状态显示(当前角色为超级管理员 应显示蓝色图标) ), - SizedBox(width: 6.w), - Text( - state.keyInfos.value.isLockOwner == 1 - ? '超级管理员'.tr - : (state.keyInfos.value.keyRight == 1 - ? '授权管理员'.tr - : '普通用户'.tr), - style: TextStyle( - fontSize: 20.sp, color: AppColors.darkGrayTextColor), - ), - if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w), - ], - ), - Row( - mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min, - children: [ - FlavorsImg( - child: Image.asset( - state.keyInfos.value.hasGateway == 1 - ? 'images/main/icon_main_remoteUnlocking.png' - : 'images/main/icon_main_remoteUnlocking_grey.png', + ), + SizedBox(width: 6.w), + Text( + '网关设备'.tr, + style: TextStyle( + fontSize: 20.sp, + color: state.keyInfos.value.hasGateway == 1 + ? AppColors.mainColor + : AppColors.btnDisableColor), + ), + if (add) SizedBox(width: 20.w) else SizedBox(width: 20.w), + ], + ), + Row( + mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min, + children: [ + FlavorsImg( + child: Image.asset('images/main/icon_lockDetail_needNetwork.png', width: 24.w, height: 20.w, - ), - ), - SizedBox(width: 6.w), - Text( - '网关设备'.tr, - style: TextStyle( - fontSize: 20.sp, - color: state.keyInfos.value.hasGateway == 1 - ? AppColors.mainColor - : AppColors.btnDisableColor), - ), - if (add) SizedBox(width: 20.w) else SizedBox(width: 20.w), - ], - ), - Row( - mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min, - children: [ - FlavorsImg( - child: Image.asset( - 'images/main/icon_lockDetail_needNetwork.png', - width: 24.w, - height: 20.w, - color: state.isOpenLockNeedOnline.value == 1 - ? AppColors.mainColor - : AppColors.btnDisableColor), - ), - SizedBox(width: 6.w), - Text( - '手机需联网'.tr, - style: TextStyle( - fontSize: 20.sp, - color: state.isOpenLockNeedOnline.value == 1 - ? AppColors.mainColor - : AppColors.btnDisableColor), - ), - if (add) ...[ - const Spacer(), - GestureDetector( - onTap: () { - Get.toNamed(Routers.selectLockTypePage); - }, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - FlavorsImg( - child: Image.asset( - 'images/mine/icon_mine_main_addLock.png', - width: 24.w, - height: 20.w, - ), + color: state.isOpenLockNeedOnline.value == 1 + ? AppColors.mainColor + : AppColors.btnDisableColor), + ), + SizedBox(width: 6.w), + Text( + '手机需联网'.tr, + style: TextStyle( + fontSize: 20.sp, + color: state.isOpenLockNeedOnline.value == 1 + ? AppColors.mainColor + : AppColors.btnDisableColor), + ), + if (add) ...[ + const Spacer(), + GestureDetector( + onTap: () { + Get.toNamed(Routers.selectLockTypePage); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + FlavorsImg( + child: Image.asset( + 'images/mine/icon_mine_main_addLock.png', + width: 24.w, + height: 20.w, ), - Text( - '添加设备'.tr, - style: TextStyle( - fontSize: 20.sp, - color: AppColors.darkGrayTextColor), - ) - ], - ), + ), + Text( + '添加设备'.tr, + style: TextStyle( + fontSize: 20.sp, + color: AppColors.darkGrayTextColor), + ) + ], ), ), - ], + ), ], - ) - ], - ), + ], + ) + ], ); }