diff --git a/Assemblies/Scripts/Examples/Write Canary to C Drive Root.ps1 b/Assemblies/Scripts/Examples/Write Canary to C Drive Root.ps1 deleted file mode 100644 index a1d7a2a..0000000 --- a/Assemblies/Scripts/Examples/Write Canary to C Drive Root.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -# Define the file path -$filePath = "C:\Canary.txt" - -# Write some content into the file -"SYSTEM Canary is alive." | Out-File -FilePath $filePath -Encoding UTF8 diff --git a/Assemblies/Scripts/Examples/Write_Canary.txt_to_C_.json b/Assemblies/Scripts/Examples/Write_Canary.txt_to_C_.json deleted file mode 100644 index e69de29..0000000 diff --git a/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx b/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx index 536d504..e981b77 100644 --- a/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx +++ b/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx @@ -66,26 +66,29 @@ const INPUT_BASE_SX = { "&:hover fieldset": { borderColor: "#3a4657" }, "&.Mui-focused fieldset": { borderColor: "#58a6ff" } }, + "& .MuiOutlinedInput-input": { padding: "9px 12px", - fontSize: "0.95rem" + fontSize: "0.95rem", + lineHeight: 1.4 }, + "& .MuiOutlinedInput-inputMultiline": { padding: "9px 12px" }, - "& .MuiInputLabel-root": { color: "#9ba3b4" }, + + "& .MuiInputLabel-root": { + color: "#9ba3b4", + transform: "translate(12px, 11px) scale(0.8)" // label at rest (inside field) + }, "& .MuiInputLabel-root.Mui-focused": { color: "#58a6ff" }, - "& input[type=number]": { - MozAppearance: "textfield" + "& .MuiInputLabel-root.MuiInputLabel-shrink": { + transform: "translate(12px, -6px) scale(0.75)" // floated label position }, - "& input[type=number]::-webkit-outer-spin-button": { - WebkitAppearance: "none", - margin: 0 - }, - "& input[type=number]::-webkit-inner-spin-button": { - WebkitAppearance: "none", - margin: 0 - } + + "& input[type=number]": { MozAppearance: "textfield" }, + "& input[type=number]::-webkit-outer-spin-button": { WebkitAppearance: "none", margin: 0 }, + "& input[type=number]::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: 0 } }; const SELECT_BASE_SX = { @@ -621,19 +624,84 @@ export default function AssemblyEditor({ flex: 1, height: "100%", overflow: "hidden", + ml: -0.95, + mt: -0.95, bgcolor: PAGE_BACKGROUND }} > - - - Assembly Editor - - - Create and edit variables, scripts, and other fields related to assemblies. - + + + {/* Left half */} + + + Assembly Editor + Create and edit variables, scripts, and other fields related to assemblies. + + + {/* Right half */} + + + {currentPath ? ( + + + + ) : null} + {currentPath ? ( + + + + ) : null} + + + + + - - {currentPath ? ( - - - - ) : null} - {currentPath ? ( - - - - ) : null} - - @@ -902,166 +913,183 @@ export default function AssemblyEditor({ key={variable.id} sx={{ p: 2, bgcolor: BACKGROUND_COLORS.field, border: "1px solid #2b3544", borderRadius: 1 }} > - - - - updateVariable(variable.id, { name: e.target.value })} - fullWidth - variant="outlined" - sx={INPUT_BASE_SX} - /> - - - - - updateVariable(variable.id, { label: e.target.value })} - fullWidth - variant="outlined" - sx={INPUT_BASE_SX} - /> - - - - - updateVariable(variable.id, { type: e.target.value })} - sx={SELECT_BASE_SX} - SelectProps={{ MenuProps: MENU_PROPS }} - > - {VARIABLE_TYPE_OPTIONS.map((opt) => ( - {opt.label} - ))} - - - + - {variable.type === "boolean" ? ( + - updateVariable(variable.id, { defaultValue: e.target.checked })} - sx={{ color: "#58a6ff" }} - /> - } - label="Default Value" - sx={{ - color: "#9ba3b4", - m: 0, - "& .MuiFormControlLabel-label": { fontSize: "0.95rem" } - }} - /> - - ) : ( - updateVariable(variable.id, { defaultValue: e.target.value })} + label="Variable" + value={variable.name} + onChange={(e) => updateVariable(variable.id, { name: e.target.value })} fullWidth variant="outlined" sx={INPUT_BASE_SX} /> - )} + + + + updateVariable(variable.id, { label: e.target.value })} + fullWidth + variant="outlined" + sx={INPUT_BASE_SX} + /> + + + + + + updateVariable(variable.id, { type: e.target.value })} + sx={SELECT_BASE_SX} + SelectProps={{ MenuProps: MENU_PROPS }} + > + {VARIABLE_TYPE_OPTIONS.map((opt) => ( + {opt.label} + ))} + + + + + {variable.type === "boolean" ? ( + + updateVariable(variable.id, { defaultValue: e.target.checked })} + sx={{ color: "#58a6ff" }} + /> + } + label="Default Value" + sx={{ + color: "#9ba3b4", + m: 0, + "& .MuiFormControlLabel-label": { fontSize: "0.95rem" } + }} + /> + + ) : ( + + updateVariable(variable.id, { defaultValue: e.target.value })} + fullWidth + variant="outlined" + sx={INPUT_BASE_SX} + /> + + )} + + + + updateVariable(variable.id, { description: e.target.value })} + fullWidth + variant="outlined" + sx={INPUT_BASE_SX} + /> + + + + + removeVariable(variable.id)} sx={{ color: "#ff6b6b" }}> + + + + - + + Required updateVariable(variable.id, { required: e.target.checked })} - sx={{ color: "#58a6ff", p: 0.5 }} + onChange={(e) => + updateVariable(variable.id, { required: e.target.checked }) + } + sx={{ + color: "#58a6ff", + p: 0.5, + }} inputProps={{ "aria-label": "Required" }} /> - - - updateVariable(variable.id, { description: e.target.value })} - fullWidth - variant="outlined" - sx={INPUT_BASE_SX} - /> - - - - - removeVariable(variable.id)} sx={{ color: "#ff6b6b" }}> - - - @@ -1117,6 +1145,7 @@ export default function AssemblyEditor({ No files uploaded yet. )} +