mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
push batch door sensor, design bugs
This commit is contained in:
@ -37,7 +37,7 @@ class DeviceBatchControlDialog extends StatelessWidget
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
devices.first.categoryName ?? 'Device Control',
|
||||
getBatchDialogName(devices.first),
|
||||
style: context.textTheme.titleLarge!.copyWith(
|
||||
color: ColorsManager.dialogBlueTitle,
|
||||
fontWeight: FontWeight.bold,
|
||||
@ -65,7 +65,7 @@ class DeviceBatchControlDialog extends StatelessWidget
|
||||
),
|
||||
),
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.all(1),
|
||||
padding: const EdgeInsets.all(1),
|
||||
icon: const Icon(
|
||||
Icons.close,
|
||||
color: Colors.grey,
|
||||
@ -92,3 +92,42 @@ class DeviceBatchControlDialog extends StatelessWidget
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String getBatchDialogName(AllDevicesModel device) {
|
||||
/*
|
||||
3G:
|
||||
1G:
|
||||
2G:
|
||||
GW:
|
||||
DL:
|
||||
WPS:
|
||||
CPS:
|
||||
AC:
|
||||
CUR:
|
||||
WH:
|
||||
*/
|
||||
switch (device.productType) {
|
||||
case '1G':
|
||||
return "Smart Light Switch";
|
||||
case '2G':
|
||||
return "2Gang Light";
|
||||
case '3G':
|
||||
return "Living Room";
|
||||
case 'GW':
|
||||
return "GateWay";
|
||||
case 'DL':
|
||||
return "Door Lock";
|
||||
case 'WPS':
|
||||
return "White Presence Sensor";
|
||||
case 'CPS':
|
||||
return "Black Presence Sensor";
|
||||
case 'CUR':
|
||||
return "Smart Curtains";
|
||||
case 'WH':
|
||||
return "Smart Water Hater";
|
||||
case 'AC':
|
||||
return "Smart AC";
|
||||
default:
|
||||
return device.categoryName ?? 'Device Control';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user