added core linux file system (kinda)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user