1,修复IOSAPP上有显示数字,并不是未读消息的数量

2,修改设备页-设置-重置键备注文本
This commit is contained in:
Daisy 2024-06-06 15:56:23 +08:00
parent 4fa11a4a0a
commit 425a68843e
5 changed files with 36 additions and 26 deletions

View File

@ -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"
}

View File

@ -900,6 +900,7 @@
"自定义邮件模版":"自定义邮件模版",
"名称":"名称",
"星星锁": "星星锁",
"为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。"
"为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。",
"开启后可通过长按锁上的设置键重新上电用APP重新添加":"开启后可通过长按锁上的设置键重新上电用APP重新添加"
}

View File

@ -868,5 +868,6 @@
"自定义邮件模版":"自定义邮件模版",
"名称":"名称",
"星星锁": "星星锁",
"为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。"
"为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。": "为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。",
"开启后可通过长按锁上的设置键重新上电用APP重新添加":"开启后可通过长按锁上的设置键重新上电用APP重新添加"
}

View File

@ -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)];
}
}
/*

View File

@ -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<ResetButtonPage> with RouteAware {
final logic = Get.put(ResetButtonLogic());
final state = Get.find<ResetButtonLogic>().state;
@override
Widget build(BuildContext context) {
return Scaffold(
@ -44,10 +43,16 @@ class _ResetButtonPageState extends State<ResetButtonPage> 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<ResetButtonPage> 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<ResetButtonPage> with RouteAware {
state.ifCurrentScreen.value = false;
state.sureBtnState.value = 0;
}
}