minor changes
This commit is contained in:
@@ -41,7 +41,6 @@ async function sendCommand(e){
|
||||
}
|
||||
}
|
||||
createNewTerminalLine();
|
||||
addInputEventListeners();
|
||||
return;
|
||||
} catch {
|
||||
handleExecutionResponse({"response": "Invalid Argument"})
|
||||
@@ -54,7 +53,6 @@ async function sendCommand(e){
|
||||
line.remove();
|
||||
})
|
||||
createNewTerminalLine();
|
||||
addInputEventListeners();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,27 +100,26 @@ function deactivateAllStuff() {
|
||||
|
||||
function handleExecutionResponse(response) {
|
||||
//Show Response
|
||||
createNewTextLine(response.response);
|
||||
|
||||
//create new terminal line.
|
||||
createNewTerminalLine();
|
||||
}
|
||||
|
||||
|
||||
function createNewTextLine(text){
|
||||
let commandResponse = document.createElement("div")
|
||||
commandResponse.classList.add("terminalLine");
|
||||
|
||||
let textElement = document.createElement("span");
|
||||
textElement.classList.add("responseText");
|
||||
textElement.innerHTML = response.response;
|
||||
textElement.innerHTML = text;
|
||||
|
||||
commandResponse.appendChild(textElement)
|
||||
terminalContainer.appendChild(commandResponse);
|
||||
|
||||
|
||||
//create new terminal line.
|
||||
createNewTerminalLine();
|
||||
|
||||
addInputEventListeners();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function createNewTerminalLine(){
|
||||
let newTerminalLine = document.createElement("div");
|
||||
newTerminalLine.classList.add("terminalLine");
|
||||
@@ -164,6 +161,8 @@ function createNewTerminalLine(){
|
||||
newTerminalLine.appendChild(blinky);
|
||||
|
||||
terminalContainer.appendChild(newTerminalLine)
|
||||
|
||||
addInputEventListeners();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user