made some slight improvements to the terminal emulator

This commit is contained in:
itzMiney committed 2026-03-17 20:33:33 +01:00
1 parent a57a27e4a3
commit 79ab1285c5
5 files changed
+170 -78

No files matched your search

@@ -43,23 +43,30 @@
<span class="prompt">$ </span>
<span class="input-shell">
<span class="input-mirror">
{{ command }}
@if (!command) {
<span class="input-placeholder">&nbsp;</span>
}
<span class="cursorblink">&#9608;</span>
</span>
<input
#terminalInput
type="text"
[(ngModel)]="command"
(keydown.enter)="runCommand()"
class="terminal-field"
autocomplete="off"
spellcheck="false"
/>
<span class="input-mirror" aria-hidden="true">
<span>{{ beforeCursor }}</span>
<span class="cursor-block" [class.blink]="isFocused && shouldBlink">
{{ cursorChar || '\u00A0' }}
</span>
<span>{{ afterCursor }}</span>
</span>
<input
#terminalInput
type="text"
[(ngModel)]="command"
(input)="handleCursorActivity()"
(click)="handleCursorActivity()"
(keyup)="handleCursorActivity()"
(keydown)="onKeydown($event)"
(keydown.enter)="onEnter($event)"
(focus)="onFocus()"
(blur)="onBlur()"
class="terminal-field"
/>
</span>
</h2>
</code>
}
@@ -69,7 +76,13 @@
</ng-template>
<ng-template #catTemplate>
<img alt="cat" class="fade-in" src="https://files.itz.sh/itzmineydev/lilguy.jpg">
<img
alt="cat"
class="fade-in"
src="https://files.itz.sh/itzmineydev/lilguy.jpg"
(load)="scrollToBottom()"
/>
<p>lil goober</p>
</ng-template>
<ng-template #toolsTemplate>