mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
add subspace and space information
This commit is contained in:
@ -95,8 +95,9 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
|
||||
]),
|
||||
TableRow(
|
||||
children: [
|
||||
_buildInfoRow('Space Name:', device.unit?.name ?? 'N/A'),
|
||||
_buildInfoRow('Room:', device.room?.name ?? 'N/A'),
|
||||
_buildInfoRow('Space Name:',
|
||||
device.spaces?.firstOrNull?.spaceName ?? 'N/A'),
|
||||
_buildInfoRow('Room:', device.subspace?.subspaceName ?? 'N/A'),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
@ -111,9 +112,13 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
|
||||
),
|
||||
_buildInfoRow(
|
||||
'Battery Level:',
|
||||
device.batteryLevel != null ? '${device.batteryLevel ?? 0}%' : "-",
|
||||
device.batteryLevel != null
|
||||
? '${device.batteryLevel ?? 0}%'
|
||||
: "-",
|
||||
statusColor: device.batteryLevel != null
|
||||
? (device.batteryLevel! < 20 ? ColorsManager.red : ColorsManager.green)
|
||||
? (device.batteryLevel! < 20
|
||||
? ColorsManager.red
|
||||
: ColorsManager.green)
|
||||
: null,
|
||||
),
|
||||
],
|
||||
|
Reference in New Issue
Block a user