From 425a68843e7b513934079285068ea30db362b071 Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Thu, 6 Jun 2024 15:56:23 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=8C=E4=BF=AE=E5=A4=8DIOSAPP=E4=B8=8A?= =?UTF-8?q?=E6=9C=89=E6=98=BE=E7=A4=BA=E6=95=B0=E5=AD=97=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E6=9C=AA=E8=AF=BB=E6=B6=88=E6=81=AF=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E9=87=8F=202=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=A1=B5-=E8=AE=BE=E7=BD=AE-=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E9=94=AE=E5=A4=87=E6=B3=A8=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/lan/lan_en.json | 3 +- images/lan/lan_keys.json | 3 +- images/lan/lan_zh.json | 3 +- ios/Runner/AppDelegate.m | 4 +- .../lockSet/resetButton/resetButton_page.dart | 49 +++++++++++-------- 5 files changed, 36 insertions(+), 26 deletions(-) diff --git a/images/lan/lan_en.json b/images/lan/lan_en.json index 101e886b..ec433bbf 100755 --- a/images/lan/lan_en.json +++ b/images/lan/lan_en.json @@ -868,6 +868,7 @@ "自定义邮件模版":"Custom email template", "名称":"Name", "星星锁": "Star lock", - "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "To receive important updates, please click 'OK' and enable notifications in the settings." + "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "To receive important updates, please click 'OK' and enable notifications in the settings.", + "开启后,可通过长按锁上的设置键重新上电,用APP重新添加":"After turning on, you can re-power on by long pressing the setting key on the lock, and re-add it with the APP" } diff --git a/images/lan/lan_keys.json b/images/lan/lan_keys.json index c8130c70..8f758a6b 100755 --- a/images/lan/lan_keys.json +++ b/images/lan/lan_keys.json @@ -900,6 +900,7 @@ "自定义邮件模版":"自定义邮件模版", "名称":"名称", "星星锁": "星星锁", - "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。" + "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。", + "开启后,可通过长按锁上的设置键重新上电,用APP重新添加":"开启后,可通过长按锁上的设置键重新上电,用APP重新添加" } diff --git a/images/lan/lan_zh.json b/images/lan/lan_zh.json index 193c6d36..73db333a 100755 --- a/images/lan/lan_zh.json +++ b/images/lan/lan_zh.json @@ -868,5 +868,6 @@ "自定义邮件模版":"自定义邮件模版", "名称":"名称", "星星锁": "星星锁", - "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。" + "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。", + "开启后,可通过长按锁上的设置键重新上电,用APP重新添加":"开启后,可通过长按锁上的设置键重新上电,用APP重新添加" } diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m index 87707e2d..3514fd7a 100755 --- a/ios/Runner/AppDelegate.m +++ b/ios/Runner/AppDelegate.m @@ -71,14 +71,14 @@ // iOS 8 Notifications [application registerUserNotificationSettings: [UIUserNotificationSettings settingsForTypes: - (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) + (UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil]]; [application registerForRemoteNotifications]; } else { // iOS < 8 Notifications [[UIApplication sharedApplication] registerForRemoteNotificationTypes: - (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; + (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)]; } } /* diff --git a/lib/main/lockDetail/lockSet/resetButton/resetButton_page.dart b/lib/main/lockDetail/lockSet/resetButton/resetButton_page.dart index ab2bfcae..936adeec 100755 --- a/lib/main/lockDetail/lockSet/resetButton/resetButton_page.dart +++ b/lib/main/lockDetail/lockSet/resetButton/resetButton_page.dart @@ -1,11 +1,10 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import '../../../../flavors.dart'; import '../../../../app_settings/app_colors.dart'; -import '../../../../blue/blue_manage.dart'; import '../../../../tools/appRouteObserver.dart'; import '../../../../tools/showTipView.dart'; import '../../../../tools/submitBtn.dart'; @@ -23,7 +22,7 @@ class ResetButtonPage extends StatefulWidget { class _ResetButtonPageState extends State with RouteAware { final logic = Get.put(ResetButtonLogic()); final state = Get.find().state; - + @override Widget build(BuildContext context) { return Scaffold( @@ -44,10 +43,16 @@ class _ResetButtonPageState extends State with RouteAware { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationLoader.lanKeys!.resetButtonTip1!.tr, - style: TextStyle(fontSize: 20.sp), - ), + if (F.isSKY) + Text( + TranslationLoader.lanKeys!.resetButtonTip1!.tr, + style: TextStyle(fontSize: 20.sp), + ) + else + Text( + '开启后,可通过长按锁上的设置键重新上电,用APP重新添加'.tr, + style: TextStyle(fontSize: 20.sp), + ), SizedBox( height: 10.h, ), @@ -63,35 +68,38 @@ class _ResetButtonPageState extends State with RouteAware { height: 30.h, ), Obx(() => Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: Text( - "${TranslationLoader.lanKeys!.currentMode!.tr} : ${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}", - style: - TextStyle(fontWeight: FontWeight.w600, fontSize: 20.sp), + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Text( + "${TranslationLoader.lanKeys!.currentMode!.tr} : ${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}", + style: TextStyle( + fontWeight: FontWeight.w600, fontSize: 20.sp), )), - ], - )), + ], + )), SizedBox( height: 30.h, ), Obx(() => SubmitBtn( - btnName: state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.close!.tr : TranslationLoader.lanKeys!.open!.tr, + btnName: state.resetButtonEnable.value == 1 + ? TranslationLoader.lanKeys!.close!.tr + : TranslationLoader.lanKeys!.open!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), onClick: () { // showDeletAlertTipDialog(context); - ShowTipView().showIosTipWithContentDialog('确定要${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.close!.tr : TranslationLoader.lanKeys!.open!.tr}重置键?', () { + ShowTipView().showIosTipWithContentDialog( + '确定要${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.close!.tr : TranslationLoader.lanKeys!.open!.tr}重置键?', + () { logic.sendBurglarAlarm(); }); })), ], ), - ) - ); + )); } @override @@ -144,5 +152,4 @@ class _ResetButtonPageState extends State with RouteAware { state.ifCurrentScreen.value = false; state.sureBtnState.value = 0; } - }