完善遥控权限、控制发送和急停反馈
This commit is contained in:
@@ -280,6 +280,7 @@ class _DeviceStatusModalState extends State<DeviceStatusModal> {
|
||||
|
||||
Widget _buildOtherParamsTable(DeviceStatusUpdated state) {
|
||||
final status = state.status;
|
||||
final l10n = AppLocalizations.of(context);
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -415,6 +416,25 @@ class _DeviceStatusModalState extends State<DeviceStatusModal> {
|
||||
),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
_buildTableCell(
|
||||
l10n.translate('device_detail_v2.stat_emergency_stop'),
|
||||
),
|
||||
_buildTableCell(
|
||||
status.emergencyStop == null
|
||||
? '--'
|
||||
: l10n.translate(
|
||||
status.emergencyStop!
|
||||
? 'device_detail_v2.emergency_stop_active'
|
||||
: 'device_detail_v2.emergency_stop_inactive',
|
||||
),
|
||||
textColor: status.emergencyStop == true
|
||||
? const Color(0xFFDC2626)
|
||||
: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
_buildTableCell(
|
||||
@@ -443,7 +463,11 @@ class _DeviceStatusModalState extends State<DeviceStatusModal> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTableCell(String text, {bool isHeader = false}) {
|
||||
Widget _buildTableCell(
|
||||
String text, {
|
||||
bool isHeader = false,
|
||||
Color? textColor,
|
||||
}) {
|
||||
return TableCell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 6),
|
||||
@@ -452,7 +476,8 @@ class _DeviceStatusModalState extends State<DeviceStatusModal> {
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isHeader ? const Color(0xFF333333) : const Color(0xFF666666),
|
||||
color: textColor ??
|
||||
(isHeader ? const Color(0xFF333333) : const Color(0xFF666666)),
|
||||
fontWeight: isHeader ? FontWeight.bold : FontWeight.normal,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user