resolved merge issue

This commit is contained in:
BuildTools 2021-12-20 00:48:03 -06:00
parent 3255768259
commit 6dc7dc42c5
4 changed files with 473 additions and 459 deletions

@ -22,6 +22,7 @@
"@types/escodegen": "^0.0.7", "@types/escodegen": "^0.0.7",
"@types/numeral": "0.0.25", "@types/numeral": "0.0.25",
"@types/react": "^17.0.21", "@types/react": "^17.0.21",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-dom": "^17.0.9", "@types/react-dom": "^17.0.9",
"@types/react-resizable": "^1.7.3", "@types/react-resizable": "^1.7.3",
"acorn": "^8.4.1", "acorn": "^8.4.1",
@ -41,6 +42,7 @@
"numeral": "2.0.6", "numeral": "2.0.6",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-beautiful-dnd": "^13.1.0",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-draggable": "^4.4.4", "react-draggable": "^4.4.4",
"react-resizable": "^3.0.4", "react-resizable": "^3.0.4",

File diff suppressed because it is too large Load Diff

@ -11,7 +11,7 @@ export function rm(
server: BaseServer, server: BaseServer,
args: (string | number | boolean)[], args: (string | number | boolean)[],
): void { ): void {
if (args.length !== 1) { if (args.length < 1) {
terminal.error("Incorrect number of arguments. Usage: rm [program/script]"); terminal.error("Incorrect number of arguments. Usage: rm [program/script]");
return; return;
} }
@ -25,6 +25,14 @@ export function rm(
try { try {
delTarget = terminal.getFilepath(args[0] + ""); delTarget = terminal.getFilepath(args[0] + "");
status = server.removeFile(delTarget); status = server.removeFile(delTarget);
// Check if we should remove it from both the text and script arrays
if(args[1] === '-tas') {
let fileIndex = server.scripts.findIndex(script => script.filename === (args[0] + ""));
if(fileIndex !== -1) {
server.scripts.splice(fileIndex, 1);
}
}
} catch (err) { } catch (err) {
status = { status = {
res: false, res: false,

@ -43,8 +43,10 @@ export function PromptManager(): React.ReactElement {
{prompt != null && ( {prompt != null && (
<Modal open={true} onClose={close}> <Modal open={true} onClose={close}>
<Typography>{prompt.txt}</Typography> <Typography>{prompt.txt}</Typography>
<Button onClick={yes}>Yes</Button> <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', paddingTop: '10px' }}>
<Button onClick={no}>No</Button> <Button style={{ marginRight: 'auto' }} onClick={yes}>Yes</Button>
<Button onClick={no}>No</Button>
</div>
</Modal> </Modal>
)} )}
</> </>