mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-10-26 20:01:57 -06:00
Misc Updates to Assembly Editor Design
This commit is contained in:
@@ -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
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"name": "Write Canary File to C:\\Canary.txt",
|
|
||||||
"description": "Self-explanatory.",
|
|
||||||
"category": "script",
|
|
||||||
"type": "powershell",
|
|
||||||
"script": "# Define the file path\n$filePath = \"C:\\Canary.txt\"\n\n# Write some content into the file\n\"SYSTEM Canary is alive.\"ddss | Out-File -FilePath $filePath -Encoding UTF8\n",
|
|
||||||
"timeout_seconds": 3600,
|
|
||||||
"sites": {
|
|
||||||
"mode": "specific",
|
|
||||||
"values": [
|
|
||||||
"1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "Example Variable",
|
|
||||||
"label": "Important Label",
|
|
||||||
"type": "string",
|
|
||||||
"default": "Blah",
|
|
||||||
"required": false,
|
|
||||||
"description": "Put something into this variable!"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"files": []
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"name": "Write Canary File to C Drive",
|
||||||
|
"description": "Writes a simple text file to the C:\\ drive of the computer. Requires SYSTEM level execution context to work.",
|
||||||
|
"category": "script",
|
||||||
|
"type": "powershell",
|
||||||
|
"script": "# Define the file path\n$filePath = \"C:\\Canary.txt\"\n\n# Write some content into the file\n$env:canaryMessage | Out-File -FilePath $filePath -Encoding UTF8\n",
|
||||||
|
"timeout_seconds": 3600,
|
||||||
|
"sites": {
|
||||||
|
"mode": "all",
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "canaryMessage",
|
||||||
|
"label": "Canary Message",
|
||||||
|
"type": "string",
|
||||||
|
"default": "Hello world!",
|
||||||
|
"required": true,
|
||||||
|
"description": "This is the text that will be written into the canary file."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"files": []
|
||||||
|
}
|
||||||
@@ -624,44 +624,33 @@ export default function AssemblyEditor({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
|
ml: -0.95,
|
||||||
|
mt: -0.95,
|
||||||
bgcolor: PAGE_BACKGROUND
|
bgcolor: PAGE_BACKGROUND
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box sx={{ flex: 1, overflow: "auto", p: { xs: 2, md: 3 } }}>
|
<Box sx={{ flex: 1, overflow: "auto", p: { xs: 2, md: 3 } }}>
|
||||||
<Paper sx={{ p: { xs: 2.5, md: 3 }, ...SECTION_CARD_SX, minHeight: "100%" }} elevation={0}>
|
<Paper sx={{ p: { xs: 2.5, md: 3 }, ...SECTION_CARD_SX, minHeight: "100%" }} elevation={0}>
|
||||||
<Box sx={{ mb: 3 }}>
|
|
||||||
<Typography variant="h5" sx={{ color: "#58a6ff", fontWeight: 500, mb: 0.5 }}>
|
|
||||||
Assembly Editor
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" sx={{ color: "#9ba3b4" }}>
|
|
||||||
Create and edit variables, scripts, and other fields related to assemblies.
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
<Box
|
<Grid container alignItems="center" justifyContent="space-between" sx={{ mb: 3 }}>
|
||||||
sx={{
|
{/* Left half */}
|
||||||
display: "flex",
|
<Grid item xs={12} sm={6}>
|
||||||
alignItems: "flex-start",
|
<Box>
|
||||||
justifyContent: "space-between",
|
<Typography variant="h6" sx={{ color: '#58a6ff', mb: 0 }}>Assembly Editor</Typography>
|
||||||
gap: 2,
|
<Typography variant="body2" sx={{ color: '#aaa' }}>Create and edit variables, scripts, and other fields related to assemblies.</Typography>
|
||||||
mb: 0,
|
|
||||||
flexWrap: "wrap"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box sx={{ flex: "1 1 auto", minWidth: 120 }}>
|
|
||||||
<Typography variant="caption" sx={SECTION_TITLE_SX}>
|
|
||||||
Overview
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
{/* Right half */}
|
||||||
|
<Grid item xs={12} sm={6}>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: 1.5,
|
gap: 1.5,
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
justifyContent: "flex-end",
|
justifyContent: { xs: "flex-start", sm: "flex-end" },
|
||||||
ml: { xs: 0, sm: "auto" },
|
mt: { xs: 2, sm: 0 }
|
||||||
alignSelf: "flex-start"
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{currentPath ? (
|
{currentPath ? (
|
||||||
@@ -710,6 +699,25 @@ export default function AssemblyEditor({
|
|||||||
{saving ? "Saving..." : "Save Assembly"}
|
{saving ? "Saving..." : "Save Assembly"}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "flex-start",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
gap: 2,
|
||||||
|
mb: 0,
|
||||||
|
flexWrap: "wrap"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box sx={{ flex: "1 1 auto", minWidth: 120 }}>
|
||||||
|
<Typography variant="caption" sx={SECTION_TITLE_SX}>
|
||||||
|
Overview
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
@@ -1137,6 +1145,7 @@ export default function AssemblyEditor({
|
|||||||
No files uploaded yet.
|
No files uploaded yet.
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
component="label"
|
component="label"
|
||||||
startIcon={<UploadFileIcon />}
|
startIcon={<UploadFileIcon />}
|
||||||
@@ -1163,5 +1172,6 @@ export default function AssemblyEditor({
|
|||||||
onConfirm={deleteAssembly}
|
onConfirm={deleteAssembly}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user