Add terminal page #3

Open
nathanwoodburn wants to merge 10 commits from feat/terminal into main
Showing only changes of commit 687e7af91b - Show all commits

View File

@@ -94,10 +94,10 @@
<div class="line output">Type 'help' for available commands</div>
<div class="line output"></div>
<div id="input-line">
<div class="prompt-line">┌──({{user}}@NathanWoodburn)-[~]</div>
<div class="prompt-line">┌──({{user}}@NW)-[~]</div>
<div class="input-row">
<span class="prompt-line">└─$&nbsp;</span>
<input type="text" id="command-input" autofocus autocomplete="off" spellcheck="false">
<input type="text" id="command-input" autofocus autocomplete="off" spellcheck="false" autocapitalize="none">
</div>
</div>
</div>
@@ -131,7 +131,7 @@
const data = await response.json();
if (data.output) {
currentPwd = data.output;
inputLine.querySelector('.prompt-line:first-child').textContent = `┌──({{user}}@NathanWoodburn)-[${currentPwd}]`;
inputLine.querySelector('.prompt-line:first-child').textContent = `┌──({{user}}@NW)-[${currentPwd}]`;
}
} catch (err) {
console.error('Failed to fetch pwd:', err);
@@ -270,7 +270,7 @@
// Display command
const cmdLine = document.createElement('div');
cmdLine.className = 'line';
cmdLine.innerHTML = `<span class="prompt">┌──({{user}}@NathanWoodburn)-[${currentPwd}]\n└─$ </span>${command}`;
cmdLine.innerHTML = `<span class="prompt">┌──({{user}}@NW)-[${currentPwd}]\n└─$ </span>${command}`;
terminal.appendChild(cmdLine);
// Add to history