Skip to content

Commit

Permalink
Closes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
csavelief committed May 21, 2024
1 parent 39e5c4a commit 981dc71
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions resources/views/home/cards/_shell.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<pre id="shell-content">
<div id="shell-logo">
{{ $server->name }} - {{ $server->ip() }}<span></span>
{{ Auth::user()->ynhUsername() }}<span></span>
Logged in as {{ $server->ssh_username }}!<span></span>
</div>
</pre>
<div id="shell-input">
Expand All @@ -110,6 +110,7 @@
</div>
<script>
const loadingIndicator = 'Running...';
const commandHistory = [];
let historyPosition = 0;
let eShellCmdInput = null;
Expand All @@ -130,12 +131,13 @@ function _insertCommand(command) {
eShellContent.innerHTML += "\n\n";
eShellContent.innerHTML += '<span class=\"shell-prompt\">' + genPrompt() + '</span> ';
eShellContent.innerHTML += escapeHtml(command);
eShellContent.innerHTML += "\n";
eShellContent.innerHTML += "\n" + loadingIndicator;
eShellContent.scrollTop = eShellContent.scrollHeight;
}
function _insertStdout(stdout) {
eShellContent.innerHTML += escapeHtml(stdout);
eShellContent.innerHTML = eShellContent.innerHTML.substring(0,
eShellContent.innerHTML.lastIndexOf(loadingIndicator)) + escapeHtml(stdout);
eShellContent.scrollTop = eShellContent.scrollHeight;
}
Expand Down

0 comments on commit 981dc71

Please sign in to comment.