Augmentations in mui

This commit is contained in:
Olivier Gagnon
2021-09-25 01:06:17 -04:00
parent 5170c0e004
commit 5c6c472b64
19 changed files with 637 additions and 574 deletions
+2 -7
View File
@@ -91,16 +91,11 @@ export class Script {
* @param {string} code - The new contents of the script
* @param {Script[]} otherScripts - Other scripts on the server. Used to process imports
*/
saveScript(code: string, serverIp: string, otherScripts: Script[]): void {
saveScript(filename: string, code: string, serverIp: string, otherScripts: Script[]): void {
// Update code and filename
this.code = code.replace(/^\s+|\s+$/g, "");
const filenameElem: HTMLInputElement | null = document.getElementById("script-editor-filename") as HTMLInputElement;
if (filenameElem == null) {
console.error(`Failed to get Script filename DOM element`);
return;
}
this.filename = filenameElem.value;
this.filename = filename;
this.server = serverIp;
this.updateRamUsage(otherScripts);
this.markUpdated();