From eeeb889ba74bc5858bcc0e26cd4a187e4c42e71f Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 24 Sep 2022 18:49:35 +0200 Subject: [PATCH] show options when editing Entity --- .../src/project/SettingsCustomization.tsx | 53 +++++++++++++++++-- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/interface/src/project/SettingsCustomization.tsx b/interface/src/project/SettingsCustomization.tsx index e83f58334..bf392ea3b 100644 --- a/interface/src/project/SettingsCustomization.tsx +++ b/interface/src/project/SettingsCustomization.tsx @@ -560,18 +560,63 @@ const SettingsCustomization: FC = () => { const renderEditEntity = () => { if (deviceEntity) { + const de = deviceEntity; return ( setDeviceEntity(undefined)}> - {LL.RENAME() + ' ' + LL.ENTITY_NAME()} + {LL.EDIT() + ' ' + LL.ENTITY() + ' ' + de.id} + - - {deviceEntity.n} + { + de.m = getMaskNumber(mask); + if (de.n === '' && de.m & DeviceEntityMask.DV_READONLY) { + de.m = de.m | DeviceEntityMask.DV_WEB_EXCLUDE; + } + if (de.m & DeviceEntityMask.DV_WEB_EXCLUDE) { + de.m = de.m & ~DeviceEntityMask.DV_FAVORITE; + } + setMasks(['']); + }} + > + + + + + + + + + + + + + + + + + {LL.DEFAULT() + ' ' + LL.NAME()}: {deviceEntity.n} +