Commit 9c940270 authored by akari's avatar akari

fix: 设置页面更新

parent 6d5b01b7
......@@ -327,7 +327,8 @@ class _UnitButton extends StatelessWidget {
child: Container(
width: 110.w,
height: 52.h,
decoration: settingsButtonDecoration(active: active),
decoration: settingsButtonDecoration(
active: active, asset: 'lib/assets/settings/btn_2.png'),
alignment: Alignment.center,
child: Text(
text,
......@@ -396,7 +397,8 @@ class _ClearButton extends StatelessWidget {
return Container(
width: 110.w,
height: 52.h,
decoration: settingsButtonDecoration(),
decoration:
settingsButtonDecoration(asset: 'lib/assets/settings/btn_2.png'),
alignment: Alignment.center,
child: Text(
'清理',
......
......@@ -289,7 +289,7 @@ class _WideFactoryButton extends StatelessWidget {
Widget build(BuildContext context) {
return SizedBox(
width: 360.w,
height: 70.h,
height: 110.h,
child: _FactoryButton(text: text),
);
}
......@@ -310,19 +310,11 @@ class _FactoryButton extends StatelessWidget {
return GestureDetector(
onTap: onPressed,
child: Container(
height: 70.h,
height: 110.h,
padding: EdgeInsets.symmetric(horizontal: 28.w),
decoration: settingsButtonDecoration(active: isEnabled),
child: Row(
children: [
Text(
'《',
style: TextStyle(
color: const Color(0xFF67C9F5).withValues(alpha: isEnabled ? 0.72 : 0.3),
fontSize: 25.sp,
fontWeight: FontWeight.w700,
),
),
Expanded(
child: Text(
text,
......@@ -330,20 +322,14 @@ class _FactoryButton extends StatelessWidget {
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: TextStyle(
color: isEnabled ? Colors.white : Colors.white.withValues(alpha: 0.5),
color: isEnabled
? Colors.white
: Colors.white.withValues(alpha: 0.5),
fontSize: 25.sp,
fontWeight: FontWeight.w800,
),
),
),
Text(
'》',
style: TextStyle(
color: const Color(0xFF67C9F5).withValues(alpha: isEnabled ? 0.72 : 0.3),
fontSize: 25.sp,
fontWeight: FontWeight.w700,
),
),
],
),
),
......
......@@ -33,12 +33,14 @@ class RemoteControlPanel extends StatelessWidget {
title: '管理员',
description: '可以设置更改设备各项参数,启动TSAAS等功能。',
accounts: state.adminAccounts,
icon: 'lib/assets/settings/icon_user2.png',
),
SizedBox(height: 32.h),
_AccountSection(
title: '监测员',
description: '只能查看设备各项参数,记录诊疗状态等权限。',
accounts: state.monitorAccounts,
icon: 'lib/assets/settings/icon_user1.png',
),
],
),
......@@ -140,11 +142,13 @@ class _AccountSection extends StatelessWidget {
required this.title,
required this.description,
required this.accounts,
required this.icon,
});
final String title;
final String description;
final List<RemoteControlAccount> accounts;
final String icon;
@override
Widget build(BuildContext context) {
......@@ -152,11 +156,11 @@ class _AccountSection extends StatelessWidget {
for (final account in accounts)
_AccountActionCard(
text: account.phone,
icon: Icons.manage_accounts_outlined,
icon: icon,
),
const _AccountActionCard(
_AccountActionCard(
text: '新增账户',
icon: Icons.person_add_alt_1_outlined,
icon: icon,
),
];
......@@ -210,21 +214,23 @@ class _AccountActionCard extends StatelessWidget {
});
final String text;
final IconData icon;
final String icon;
@override
Widget build(BuildContext context) {
return Container(
width: 235.w,
height: 92.h,
width: 281.w,
height: 100.h,
padding: EdgeInsets.symmetric(horizontal: 22.w),
decoration: settingsButtonDecoration(),
decoration:
settingsButtonDecoration(asset: 'lib/assets/settings/btn_2.png'),
child: Row(
children: [
Icon(
Image.asset(
icon,
color: const Color(0xFF78C8F5).withValues(alpha: 0.78),
size: 42.w,
width: 22,
height: 22,
fit: BoxFit.contain,
),
SizedBox(width: 16.w),
Expanded(
......
......@@ -100,7 +100,8 @@ class _CheckUpdateButton extends StatelessWidget {
width: 245.w,
height: 104.h,
padding: EdgeInsets.symmetric(horizontal: 24.w),
decoration: settingsButtonDecoration(active: true),
decoration: settingsButtonDecoration(
active: true, asset: "lib/assets/settings/btn_2.png"),
child: Row(
children: [
Container(
......@@ -245,20 +246,11 @@ class _UpdateActionButton extends StatelessWidget {
info.canUpdate ? Colors.white : Colors.white.withValues(alpha: 0.42);
return Container(
width: 345.w,
height: 70.h,
height: 110.h,
padding: EdgeInsets.symmetric(horizontal: 28.w),
decoration: settingsButtonDecoration(active: info.canUpdate),
child: Row(
children: [
Text(
'《《',
style: TextStyle(
color: const Color(0xFF67C9F5)
.withValues(alpha: info.canUpdate ? 0.72 : 0.34),
fontSize: 26.sp,
fontWeight: FontWeight.w700,
),
),
Expanded(
child: Text(
info.actionText,
......@@ -272,15 +264,6 @@ class _UpdateActionButton extends StatelessWidget {
),
),
),
Text(
'》》',
style: TextStyle(
color: const Color(0xFF67C9F5)
.withValues(alpha: info.canUpdate ? 0.72 : 0.34),
fontSize: 26.sp,
fontWeight: FontWeight.w700,
),
),
],
),
);
......
......@@ -7,7 +7,7 @@ const String settingsAssetPanelMain =
'lib/assets/settings/frame_panel_3900x2000.png';
const String settingsAssetDDL = 'lib/assets/settings/ddl.png';
const String settingsAssetButton = 'lib/assets/settings/frame_333x150.png';
const String settingsAssetButton = 'lib/assets/settings/btn_1.png';
class SettingsPanelFrame extends StatelessWidget {
const SettingsPanelFrame({
......@@ -50,8 +50,8 @@ BoxDecoration settingsButtonDecoration({
boxShadow: active
? [
BoxShadow(
color: const Color(0xFF45CFFF).withValues(alpha: 0.3),
blurRadius: 18.r,
color: const Color(0xFF45CFFF).withValues(alpha: 0.2),
blurRadius: 40.r,
spreadRadius: 1.r,
),
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment