1,新增分享图片

2,优化右上角点击弹出框传入数据
3,对部分入口进行更新
This commit is contained in:
Daisy 2023-08-01 14:38:02 +08:00
parent c520a825aa
commit 83b2b7159d
14 changed files with 89 additions and 41 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -203,6 +203,7 @@
"touchUnlock":"Touch Unlock",
"pushNotification":"Push Notification",
"lockUserManagement":"Lock User Management",
"ownedKey":"Owned key",
"authorityManagement":"Authority management",
"associatedDevice":"Associated device",
"associatedName":"Associated name",

View File

@ -203,6 +203,7 @@
"touchUnlock":"touchUnlock",
"pushNotification":"pushNotification",
"lockUserManagement":"lockUserManagement",
"ownedKey":"ownedKey",
"authorityManagement":"authorityManagement",
"associatedDevice":"associatedDevice",
"associatedName":"associatedName",

View File

@ -203,6 +203,7 @@
"touchUnlock":"触摸开锁",
"pushNotification":"消息推送",
"lockUserManagement":"锁用户管理",
"ownedKey":"拥有的钥匙",
"authorityManagement":"权限管理",
"associatedDevice":"关联设备",
"associatedName":"关联姓名",

View File

@ -78,7 +78,9 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
rightTitle: "",
isHaveDirection: true,
action: () {}),
action: () {
Navigator.pushNamed(context, Routers.keyOperationRecordPage);
}),
Container(height: 40.h),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.delete!.tr,

View File

@ -47,11 +47,6 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
},
),
// SubmitBtn(
// btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
// onClick: () {
// Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
// }),
SizedBox(
height: 64.h,
)
@ -66,7 +61,8 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
// Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
});
}
@ -125,18 +121,16 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
],
),
SizedBox(height: 5.h),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15 永久",
style: TextStyle(
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"2023.6.21 11.15 永久",
style: TextStyle(
fontSize: 18.sp,
color: AppColors.placeholderTextColor),
),
],
),
SizedBox(width: 20.h),
],

View File

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/tools/jh_pop_menus.dart';
import '../../../../../appRouters.dart';
import '../../../../../app_settings/app_colors.dart';
@ -30,6 +31,25 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.keyDetail!.tr,
haveBack: true,
actionsList: [
IconButton(
icon: Image.asset(
'images/icon_bar_more.png',
height: 30.h,
width: 10.w,
),
onPressed: () {
JhPopMenus.showLinePop(context,
clickCallback: (index, selText) {
print('选中index: $index');
print('选中text: $selText');
}, listData: [
{'text': '冻结'},
{'text': '取消授权'}
]);
},
),
],
backgroundColor: AppColors.mainColor),
body: Column(
children: [
@ -78,7 +98,8 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
rightTitle: "",
isHaveDirection: true,
action: () {
Navigator.pushNamed(context, Routers.keyOperationRecordPage, arguments: {});
Navigator.pushNamed(context, Routers.keyOperationRecordPage,
arguments: {});
}),
Container(height: 40.h),
SubmitBtn(

View File

@ -42,10 +42,15 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
if (selText == '扫一扫') {
// _scan();
}
});
}, listData: [
{'text': '读取记录'},
{'text': '清空记录'},
{'text': '导出记录'},
]);
},
),
],
/*
actionsList: [
TextButton(

View File

@ -80,7 +80,9 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
rightTitle: "",
isHaveDirection: true,
action: () {}),
action: () {
Navigator.pushNamed(context, Routers.keyOperationRecordPage);
}),
Container(height: 40.h),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.delete!.tr,

View File

@ -27,14 +27,24 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
"分享",
style: TextStyle(color: Colors.white, fontSize: 24.sp),
IconButton(
icon: Image.asset(
'images/icon_bar_share.png',
height: 30.h,
width: 30.w,
),
onPressed: () {},
),
],
// actionsList: [
// TextButton(
// child: Text(
// "分享",
// style: TextStyle(color: Colors.white, fontSize: 24.sp),
// ),
// onPressed: () {},
// ),
// ],
),
body: Column(
children: [
@ -76,7 +86,9 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
rightTitle: "",
isHaveDirection: true,
action: () {}),
action: () {
Navigator.pushNamed(context, Routers.keyOperationRecordPage);
}),
Container(height: 40.h),
SubmitBtn(
btnName: TranslationLoader.lanKeys!.delete!.tr,

View File

@ -90,7 +90,8 @@ class _AuthorizedAdministratorListPageState
itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
// Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
});
}

View File

@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get_utils/get_utils.dart';
import 'package:star_lock/translations/trans_lib.dart';
import '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart';
@ -18,7 +20,7 @@ class _OwnedKeyListPageState extends State<OwnedKeyListPage> {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: "拥有的钥匙",
barTitle: TranslationLoader.lanKeys!.ownedKey!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
),
@ -38,9 +40,9 @@ class _OwnedKeyListPageState extends State<OwnedKeyListPage> {
// margin: EdgeInsets.only(left: 30.w, top: 30.w, right: 30.w, bottom: 30.w),
child: Padding(
padding:
EdgeInsets.only(left: 30.w, top: 30.w, right: 20.w, bottom: 10.w),
EdgeInsets.only(left: 30.w, top: 20.w, right: 20.w, bottom: 10.w),
child: Text(
"拥有的钥匙",
TranslationLoader.lanKeys!.ownedKey!.tr,
style: TextStyle(fontSize: 24.sp),
),
),

View File

@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'screen_utils.dart';
List _listData = [
{'text': '读取记录'},
{'text': '清空记录'},
{'text': '导出记录'},
];
// List _listData = [
// {'text': '读取记录'},
// {'text': '清空记录'},
// {'text': '导出记录'},
// ];
const Color _bgColor = Color(0xFF2D2D2D);
const double _fontSize = 20.0;
@ -17,6 +17,7 @@ class JhPopMenus {
/// pop
static void show(
BuildContext context, {
required List<dynamic> listData,
Function(int selectIndex, String selectText)? clickCallback,
}) {
// Cell
@ -31,7 +32,7 @@ class JhPopMenus {
color: _bgColor,
child: InkWell(
onTap: () {
clickCallback?.call(index, _listData[index]['text']);
clickCallback?.call(index, listData[index]['text']);
Navigator.pop(context);
},
child: Row(
@ -74,13 +75,14 @@ class JhPopMenus {
}
Navigator.of(context)
.push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
.push(DialogRouter(_BasePopMenus(child: menusView(listData))));
}
/// 线 pop
static void showLinePop(
BuildContext context, {
bool isShowBg = false,
required List<dynamic> listData,
Function(int selectIndex, String selectText)? clickCallback,
}) {
// 线
@ -94,7 +96,7 @@ class JhPopMenus {
color: _bgColor,
child: InkWell(
onTap: () {
clickCallback?.call(index, _listData[index]['text']);
clickCallback?.call(index, listData[index]['text']);
Navigator.pop(context);
},
child: SizedBox(
@ -158,12 +160,12 @@ class JhPopMenus {
context: context,
barrierDismissible: false,
builder: (context) {
return _BasePopMenus(child: menusView(_listData));
return _BasePopMenus(child: menusView(listData));
},
);
} else {
Navigator.of(context)
.push(DialogRouter(_BasePopMenus(child: menusView(_listData))));
.push(DialogRouter(_BasePopMenus(child: menusView(listData))));
}
}
}

View File

@ -199,6 +199,7 @@ class LanKeyEntity {
this.touchUnlock,
this.pushNotification,
this.lockUserManagement,
this.ownedKey,
this.authorityManagement,
this.associatedDevice,
this.associatedName,
@ -581,6 +582,7 @@ class LanKeyEntity {
touchUnlock = json['touchUnlock'];
pushNotification = json['pushNotification'];
lockUserManagement = json['lockUserManagement'];
ownedKey = json['ownedKey'];
authorityManagement = json['authorityManagement'];
associatedDevice = json['associatedDevice'];
associatedName = json['associatedName'];
@ -979,6 +981,7 @@ class LanKeyEntity {
String? touchUnlock;
String? pushNotification;
String? lockUserManagement;
String? ownedKey;
String? authorityManagement;
String? associatedDevice;
String? associatedName;
@ -1374,6 +1377,7 @@ class LanKeyEntity {
map['touchUnlock'] = touchUnlock;
map['pushNotification'] = pushNotification;
map['lockUserManagement'] = lockUserManagement;
map['ownedKey'] = ownedKey;
map['authorityManagement'] = authorityManagement;
map['associatedDevice'] = associatedDevice;
map['associatedName'] = associatedName;