From 3b147c879d4024fbc10da6f3a46fa5331089e86d Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Thu, 8 Jun 2023 12:09:45 -0300 Subject: [PATCH] Formatting --- src/frontend/src/App.tsx | 5 +- .../src/CustomNodes/GenericNode/index.tsx | 128 +++++++++--------- src/frontend/src/index.css | 18 +-- src/frontend/src/utils.ts | 7 +- 4 files changed, 72 insertions(+), 86 deletions(-) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 734c90418..f68c3ea73 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -134,8 +134,9 @@ export default function App() {
-
{alertsList.map((alert) => (
diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index bd01cde80..86eaf299d 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -102,45 +102,43 @@ export default function GenericNode({ } return ( - <> - - - - -
-
-
- -
- -
{data.type}
-
+ + + + +
+
+
+ +
+ +
{data.type}
+
+
-
-
- +
+
@@ -222,25 +220,25 @@ export default function GenericNode({ {data.node.template[t].show && !data.node.template[t].advanced ? ( + data={data} + color={ + nodeColors[types[data.node.template[t].type]] ?? + nodeColors.unknown + } + title={ + data.node.template[t].display_name + ? data.node.template[t].display_name + : data.node.template[t].name + ? toTitleCase(data.node.template[t].name) + : toTitleCase(t) + } + name={t} + tooltipTitle={data.node.template[t].type} + required={data.node.template[t].required} + id={data.node.template[t].type + "|" + t + "|" + data.id} + left={true} + type={data.node.template[t].type} + /> ) : ( <> )} @@ -257,15 +255,15 @@ export default function GenericNode({ {/*
Output
*/} - +
diff --git a/src/frontend/src/index.css b/src/frontend/src/index.css index 858a0b47c..6cbba6af7 100644 --- a/src/frontend/src/index.css +++ b/src/frontend/src/index.css @@ -116,18 +116,6 @@ -radius: 0.5rem; } - -@layer base { - * { - @apply border-border; - } - - body { - @apply bg-background text-foreground; - font-feature-settings: "rlig" 1, "calt" 1; - } -} - @layer base { * { @apply border-border; @@ -142,11 +130,7 @@ body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", - "Cantarell", - "Fira Sans", - "Droid Sans", - "Helvetica Neue", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index 5f8d56b51..920c1b296 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -535,9 +535,12 @@ export function updateTemplate( if (objectToUpdate[key] && objectToUpdate[key].value) { clonedObject[key].value = objectToUpdate[key].value; } - if(objectToUpdate[key] && objectToUpdate[key].advanced!==null && objectToUpdate[key].advanced!==undefined){ + if ( + objectToUpdate[key] && + objectToUpdate[key].advanced !== null && + objectToUpdate[key].advanced !== undefined + ) { clonedObject[key].advanced = objectToUpdate[key].advanced; - } } return clonedObject;