improve layout

This commit is contained in:
Proddy
2023-05-11 21:37:24 +02:00
parent 3ecaeffec0
commit 0e0ec7a7c7
2 changed files with 12 additions and 2 deletions

View File

@@ -436,7 +436,9 @@ const DashboardDevices: FC = () => {
}
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);
setDeviceValueDialogOpen(true);
};

View File

@@ -109,7 +109,15 @@ const DashboarDevicesDialog = ({
};
return (
<Dialog open={open} onClose={close}>
<Dialog
open={open}
onClose={close}
sx={{
'& .MuiDialog-paper': {
borderRadius: '16px'
}
}}
>
<DialogTitle>
{selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(1)}
</DialogTitle>