added core linux file system (kinda)

This commit is contained in:
valentijn
2024-02-03 14:17:58 +01:00
parent beda73729d
commit 61c6426665
4 changed files with 71 additions and 9 deletions

View File

@@ -85,7 +85,6 @@ function createNewTextLine(text){
terminalContainer.appendChild(commandResponse);
}
function createNewTerminalLine(){
let newTerminalLine = document.createElement("div");
newTerminalLine.classList.add("terminalLine");
@@ -103,7 +102,11 @@ function createNewTerminalLine(){
fetch('/currentDir')
.then(response => response.text())
.then(data => {
pathPath.innerHTML = "~"+data;
if (data.startsWith("/home/guest")){
pathPath.innerHTML = "~"+data.split("/home/guest")[1]
} else {
pathPath.innerHTML = data;
}
pathPath.classList.add("pathPath");
})
.catch(error => console.error('Error:', error));