Misc Updates to Assembly Editor Design

This commit is contained in:
2025-10-03 16:59:41 -06:00
parent 40840089fe
commit dde1d07210
4 changed files with 98 additions and 95 deletions

View File

@@ -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

View File

@@ -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": []
}

View File

@@ -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": []
}

View File

@@ -624,44 +624,33 @@ export default function AssemblyEditor({
flex: 1,
height: "100%",
overflow: "hidden",
ml: -0.95,
mt: -0.95,
bgcolor: PAGE_BACKGROUND
}}
>
<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}>
<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
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>
<Grid container alignItems="center" justifyContent="space-between" sx={{ mb: 3 }}>
{/* Left half */}
<Grid item xs={12} sm={6}>
<Box>
<Typography variant="h6" sx={{ color: '#58a6ff', mb: 0 }}>Assembly Editor</Typography>
<Typography variant="body2" sx={{ color: '#aaa' }}>Create and edit variables, scripts, and other fields related to assemblies.</Typography>
</Box>
</Grid>
{/* Right half */}
<Grid item xs={12} sm={6}>
<Box
sx={{
display: "flex",
alignItems: "center",
gap: 1.5,
flexWrap: "wrap",
justifyContent: "flex-end",
ml: { xs: 0, sm: "auto" },
alignSelf: "flex-start"
justifyContent: { xs: "flex-start", sm: "flex-end" },
mt: { xs: 2, sm: 0 }
}}
>
{currentPath ? (
@@ -710,6 +699,25 @@ export default function AssemblyEditor({
{saving ? "Saving..." : "Save Assembly"}
</Button>
</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>
<Grid container spacing={2}>
@@ -1137,6 +1145,7 @@ export default function AssemblyEditor({
No files uploaded yet.
</Typography>
)}
<Button
component="label"
startIcon={<UploadFileIcon />}
@@ -1163,5 +1172,6 @@ export default function AssemblyEditor({
onConfirm={deleteAssembly}
/>
</Box>
);
}