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", "touchUnlock":"Touch Unlock",
"pushNotification":"Push Notification", "pushNotification":"Push Notification",
"lockUserManagement":"Lock User Management", "lockUserManagement":"Lock User Management",
"ownedKey":"Owned key",
"authorityManagement":"Authority management", "authorityManagement":"Authority management",
"associatedDevice":"Associated device", "associatedDevice":"Associated device",
"associatedName":"Associated name", "associatedName":"Associated name",

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/tools/jh_pop_menus.dart';
import '../../../../../appRouters.dart'; import '../../../../../appRouters.dart';
import '../../../../../app_settings/app_colors.dart'; import '../../../../../app_settings/app_colors.dart';
@ -30,6 +31,25 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.keyDetail!.tr, barTitle: TranslationLoader.lanKeys!.keyDetail!.tr,
haveBack: true, 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), backgroundColor: AppColors.mainColor),
body: Column( body: Column(
children: [ children: [
@ -78,7 +98,8 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
rightTitle: "", rightTitle: "",
isHaveDirection: true, isHaveDirection: true,
action: () { action: () {
Navigator.pushNamed(context, Routers.keyOperationRecordPage, arguments: {}); Navigator.pushNamed(context, Routers.keyOperationRecordPage,
arguments: {});
}), }),
Container(height: 40.h), Container(height: 40.h),
SubmitBtn( SubmitBtn(

View File

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

View File

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

View File

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

View File

@ -90,7 +90,8 @@ class _AuthorizedAdministratorListPageState
itemBuilder: (c, index) { itemBuilder: (c, index) {
return _electronicKeyItem('images/controls_user.png', "张三", return _electronicKeyItem('images/controls_user.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () { "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/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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 '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart'; import '../../../../app_settings/app_colors.dart';
@ -18,7 +20,7 @@ class _OwnedKeyListPageState extends State<OwnedKeyListPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: "拥有的钥匙", barTitle: TranslationLoader.lanKeys!.ownedKey!.tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor, 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), // margin: EdgeInsets.only(left: 30.w, top: 30.w, right: 30.w, bottom: 30.w),
child: Padding( child: Padding(
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( child: Text(
"拥有的钥匙", TranslationLoader.lanKeys!.ownedKey!.tr,
style: TextStyle(fontSize: 24.sp), style: TextStyle(fontSize: 24.sp),
), ),
), ),

View File

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