mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
improve layout
This commit is contained in:
@@ -436,7 +436,9 @@ const DashboardDevices: FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sendCommand = (dv: DeviceValue) => {
|
const sendCommand = (dv: DeviceValue) => {
|
||||||
setSelectedDeviceValueWriteable(dv.c && me.admin && !hasMask(dv.id, DeviceEntityMask.DV_READONLY));
|
if (dv.c !== undefined) {
|
||||||
|
setSelectedDeviceValueWriteable(me.admin && !hasMask(dv.id, DeviceEntityMask.DV_READONLY));
|
||||||
|
}
|
||||||
setSelectedDeviceValue(dv);
|
setSelectedDeviceValue(dv);
|
||||||
setDeviceValueDialogOpen(true);
|
setDeviceValueDialogOpen(true);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -109,7 +109,15 @@ const DashboarDevicesDialog = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onClose={close}>
|
<Dialog
|
||||||
|
open={open}
|
||||||
|
onClose={close}
|
||||||
|
sx={{
|
||||||
|
'& .MuiDialog-paper': {
|
||||||
|
borderRadius: '16px'
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(1)}
|
{selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(1)}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|||||||
Reference in New Issue
Block a user