diff --git a/package.json b/package.json index b0da604c..17a87785 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ledfx", - "version": "2.0.107-b7", + "version": "2.0.107-b8", "description": "LedFx v2 - BladeMOD!", "author": "YeonV aka Blade", "private": true, diff --git a/src/components/Dialogs/AddVirtualDialog.tsx b/src/components/Dialogs/AddVirtualDialog.tsx index e64a41df..a64a259b 100644 --- a/src/components/Dialogs/AddVirtualDialog.tsx +++ b/src/components/Dialogs/AddVirtualDialog.tsx @@ -69,11 +69,7 @@ const AddVirtualDialog = () => { if (!valid) { showSnackbar('warning', 'Please fill in all required fields.') - } else if ( - initial.config && - Object.keys(initial.config).length === 0 && - initial.config?.constructor === Object - ) { + } else if (addNew) { // console.log("ADDING"); addVirtual({ config: { ...defaultModel, ...cleanedModel } @@ -116,6 +112,11 @@ const AddVirtualDialog = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [virtId, JSON.stringify(initial.config)]) + const addNew = + initial.config && + Object.keys(initial.config).length === 0 && + initial.config?.constructor === Object + return ( <> { aria-labelledby="form-dialog-title" > - {initial.config && - Object.keys(initial.config).length === 0 && - initial.config?.constructor === Object - ? 'Add Virtual Device' - : 'Settings'} + {addNew ? 'Add Virtual Device' : 'Settings'} @@ -157,13 +154,7 @@ const AddVirtualDialog = () => { @@ -172,11 +163,7 @@ const AddVirtualDialog = () => { Cancel diff --git a/src/components/PixelGraph/PixelGraphCanvas.tsx b/src/components/PixelGraph/PixelGraphCanvas.tsx index ddaacc82..bef55550 100644 --- a/src/components/PixelGraph/PixelGraphCanvas.tsx +++ b/src/components/PixelGraph/PixelGraphCanvas.tsx @@ -112,7 +112,7 @@ const PixelGraphCanvas = ({ className={`${className} ${active ? 'active' : ''}`} style={{ maxWidth: fullScreen ? '100vw' : '520px', - maxHeight: fullScreen ? '100vh' : '380px', + maxHeight: fullScreen ? '100vh' : '520px', height: !render || virtuals[virtId]?.config?.rows < 2 || !showMatrix ? '20px'