- {output.split('\n').map((line) => (
-
- {line}
-
- ))}
+
+
+
+ Logs
+
+
+
+
+ {output.split('\n').map((line) => (
+
+ {line}
+
+ ))}
+
>
diff --git a/src/component/logs.css b/src/component/logs.css
index f156181..a358bb5 100644
--- a/src/component/logs.css
+++ b/src/component/logs.css
@@ -16,6 +16,14 @@
margin: 20px auto;
z-index: 10000;
}
+
+ .outlay {
+ position: absolute;
+ width: 100vw;
+ height: 100vh;
+ z-index: 999;
+ display: none;
+ }
.terminal-header {
padding: 5px;
diff --git a/src/component/modals/GraphCompDetails.jsx b/src/component/modals/GraphCompDetails.jsx
index 6e66f5b..a8316a0 100644
--- a/src/component/modals/GraphCompDetails.jsx
+++ b/src/component/modals/GraphCompDetails.jsx
@@ -109,13 +109,14 @@ const ModalComp = ({ closeModal, superState, dispatcher }) => {
}
};
- const createLibrary = () => {
+ const createLibrary = (e) => {
const fileName = data.label.split(':')[1];
if (fileName === undefined || fileName === '') {
toast.error('Enter File Name');
return;
}
superState.curGraphInstance.library(fileName);
+ submit(e);
};
return (
diff --git a/src/config/defaultValidators.js b/src/config/defaultValidators.js
index 79ccf93..0b4fd89 100644
--- a/src/config/defaultValidators.js
+++ b/src/config/defaultValidators.js
@@ -43,7 +43,7 @@ edges.forEach((e) => {
break;
}
}
- if (numE === numEdge && numE != "0") {
+ if (numE === numEdge && numE != "0" && numE !== "") {
message = {
ok: false,
err: '2 edges cannot have same prefixes if they are number',
diff --git a/src/graph-builder/graph-core/5-load-save.js b/src/graph-builder/graph-core/5-load-save.js
index bc9421a..97e01ee 100644
--- a/src/graph-builder/graph-core/5-load-save.js
+++ b/src/graph-builder/graph-core/5-load-save.js
@@ -121,6 +121,16 @@ class GraphLoadSave extends GraphUndoRedo {
const stream = await handle.createWritable();
await stream.write(blob);
await stream.close();
+ const fileData = await handle.getFile();
+ let fS = this.superState.fileState;
+ fS = fS.concat([{
+ key: `${this.superState.uploadedDirName}/${handle.name}`,
+ modified: fileData.lastModified,
+ size: fileData.size,
+ fileObj: fileData,
+ fileHandle: handle,
+ }]);
+ this.dispatcher({ type: T.SET_FILE_STATE, payload: fS });
} else {
// eslint-disable-next-line no-alert
const fileName = prompt('Filename:');
diff --git a/src/graph-builder/graph-core/6-server.js b/src/graph-builder/graph-core/6-server.js
index 51a8ae8..daf2e24 100644
--- a/src/graph-builder/graph-core/6-server.js
+++ b/src/graph-builder/graph-core/6-server.js
@@ -79,7 +79,7 @@ class GraphServer extends GraphLoadSave {
this.dispatcher({
type: T.SET_FUNCTIONS,
payload: {
- built: false, ran: false, debugged: true, cleared: false, stopped: false, destroyed: true,
+ built: false, ran: true, debugged: true, cleared: false, stopped: false, destroyed: true,
},
});
this.dispatcher({ type: T.SET_LOGS_MESSAGE, payload: this.superState.logsmessage + res.data.output });