修改密码详情修改有效期问题

This commit is contained in:
魏少阳 2024-05-16 16:24:02 +08:00
parent f615616f0e
commit a260543bb5
9 changed files with 29 additions and 27 deletions

View File

@ -681,6 +681,7 @@
"密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。": "After the password is generated, please use it once for activation before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. After the password is activated, it can be used unlimited times within the validity period.",
"密码生成后请在当日2359前使用否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. The clear code is used to clear all the passwords generated before 0 o'clock today.",
"密码生成后请在当日2359前使用否则过0点后失效。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock.",
"清空密码底部提示": "The password is valid until 24 o 'clock on the day of emptying\nEmpty content 1: All passwords except custom generated before 0 o 'clock on the same day (passwords generated after 0 o 'clock on the same day are not affected by the empty password and can continue to be used) \nEmpty content 2: Clear passwords Clear all custom passwords (used and unused) immediately after use \nTo completely clear all passwords, use the Reset All Passwords feature",
"相机": "camera",
"相册": "photos",
"读写": "storage",

View File

@ -708,6 +708,7 @@
"密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。": "密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。",
"密码生成后请在当日2359前使用否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。":"密码生成后请在当日2359前使用否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。",
"密码生成后请在当日2359前使用否则过0点后失效。": "密码生成后请在当日2359前使用否则过0点后失效。",
"清空密码底部提示": "清空密码底部提示",
"密码不一致哦":"密码不一致哦",
"相机": "相机",

View File

@ -683,6 +683,7 @@
"密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。": "密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效。密码激活后有效期内不限次数使用。",
"密码生成后请在当日2359前使用否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "密码生成后请在当日2359前使用否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。",
"密码生成后请在当日2359前使用否则过0点后失效。": "密码生成后请在当日2359前使用否则过0点后失效。",
"清空密码底部提示": "清空密码当日24点前有效\n清空内容1当日0点前生成的除自定义以外所有密码当日0点后生成的密码不受清空密码影响可继续使用\n清空内容2清空密码使用后立即清除所有自定义密码含使用过和未使用过的\n如需彻底清除所有密码请使用重置所有密码功能",
"密码不一致哦": "密码不一致哦",
"相机": "相机",
"相册": "相册",

View File

@ -1,9 +1,9 @@
import 'dart:async';
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:get/get.dart';
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
import 'package:star_lock/blue/io_type.dart';
import 'package:star_lock/main/lockDetail/face/addFace/addFace_state.dart';
import 'package:star_lock/tools/eventBusEventManage.dart';
@ -23,8 +23,7 @@ class AddFaceLogic extends BaseGetXController {
//
late StreamSubscription<Reply> _replySubscription;
void _initReplySubscription() {
_replySubscription =
EventBusManager().eventBus!.on<Reply>().listen((reply) async {
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
//
if (reply is SenderAddFaceReply && state.ifCurrentScreen.value == true) {
_replyAddFaceBegin(reply);

View File

@ -1,3 +1,4 @@
import 'dart:async';
import 'package:flutter/scheduler.dart';
@ -5,7 +6,6 @@ import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:star_lock/blue/io_protocol/io_getStarLockStatusInfo.dart';
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
import 'package:star_lock/widget/permission/permission_dialog.dart';
@ -191,7 +191,7 @@ class LockDetailLogic extends BaseGetXController {
AppLog.log("dataLength:$dataLength");
if (dataLength > 0) {
reply.data.removeRange(0, 7);
// 8
// 17
if (reply.data.length < 17) {
return;
}

View File

@ -5,7 +5,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart';
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
import 'package:star_lock/tools/dateTool.dart';
import 'package:star_lock/tools/showTFView.dart';
import 'package:star_lock/tools/showTipView.dart';
@ -104,22 +103,21 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
});
if (backData != null) {
state.itemData.value.startDate =
int.parse(backData["beginTimeTimestamp"]) * 1000;
int.parse(backData["beginTimeTimestamp"]);
state.itemData.value.endDate =
int.parse(backData["endTimeTimestamp"]) * 1000;
int.parse(backData["endTimeTimestamp"]);
//
state.itemData.value.keyboardPwdType = 3;
setState(() {});
}
})),
Obx(() => Visibility(
visible: (state.isCirculation.value == false) && (state.itemData.value.isCustom! != 1),
child: CommonItem(
leftTitel: "结束时间",
rightTitle: DateTool().dateToYMDHNString(
state.itemData.value.endDate.toString()),
isHaveLine: true),
)),
// Obx(() => Visibility(
// visible: (state.isCirculation.value == false) && (state.itemData.value.isCustom! != 1),
// child: CommonItem(
// leftTitel: "结束时间",
// rightTitle: DateTool().dateToYMDHNString(state.itemData.value.endDate.toString()),
// isHaveLine: true),
// )),
Container(height: 10.h),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.sender!.tr,

View File

@ -2,6 +2,7 @@ import 'dart:async';
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_settings.dart';
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetailChangeDate/passwordKeyDetailChangeDate_state.dart';
import 'package:star_lock/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKeyEntity.dart';
import 'package:star_lock/network/api_repository.dart';
@ -103,6 +104,7 @@ class PasswordKeyDetailChangeDateLogic extends BaseGetXController {
if (entity.errorCode!.codeIsSuccessful) {
showToast("修改成功", something: (){
eventBus.fire(GetPasswordListRefreshUI());
AppLog.log("beginTimeTimestamp:$beginTimeTimestamp endTimeTimestamp:$endTimeTimestamp");
Get.back(result: {
"beginTimeTimestamp": beginTimeTimestamp.toString(),
"endTimeTimestamp": endTimeTimestamp.toString(),

View File

@ -290,52 +290,52 @@ class PasswordKeyListLogic extends BaseGetXController {
case 5:
// 5
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周末".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周末".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 6:
// 6
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"每日".tr}$starHour:00-$endHour:00 ${"循环"}';
'${"每日".tr}$starHour:00-$endHour:00 ${"循环"}';
break;
case 7:
// 7
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"工作日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"工作日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 8:
// 8
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周一".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周一".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 9:
// 9
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周二".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周二".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 10:
// 10
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周三".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周三".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 11:
// 11
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周四".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周四".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 12:
// 12
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周五".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周五".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 13:
// 13
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周六".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周六".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
case 14:
// 14
useDateStr =
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
'${"周日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
break;
default:

View File

@ -193,7 +193,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
state.nameController),
keyBottomWidget(
"清空密码使用一次后失效。清空内容1今日0点前生成的除自定义以外所有密码日0点后生成的密码不受清空密码影响可继续使用。清空内容2清空密码使用后立即清除所有自定义密码。如需彻底清除所有密码请使用重置所有密码功能".tr)
"清空密码底部提示".tr)
],
),
);