another small improvement
This commit is contained in:
1 parent
79ab1285c5
commit
d43cbcc5c9
2 files changed
+1
-6
No files matched your search
@@ -61,7 +61,7 @@
|
|||||||
(click)="handleCursorActivity()"
|
(click)="handleCursorActivity()"
|
||||||
(keyup)="handleCursorActivity()"
|
(keyup)="handleCursorActivity()"
|
||||||
(keydown)="onKeydown($event)"
|
(keydown)="onKeydown($event)"
|
||||||
(keydown.enter)="onEnter($event)"
|
(keydown.enter)="$event.preventDefault(); runCommand()"
|
||||||
(focus)="onFocus()"
|
(focus)="onFocus()"
|
||||||
(blur)="onBlur()"
|
(blur)="onBlur()"
|
||||||
class="terminal-field"
|
class="terminal-field"
|
||||||
|
|||||||
@@ -113,11 +113,6 @@ export class TerminalEmulatorComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onEnter(event: Event): void {
|
|
||||||
event.preventDefault();
|
|
||||||
this.runCommand();
|
|
||||||
}
|
|
||||||
|
|
||||||
runCommand() {
|
runCommand() {
|
||||||
const cmd = this.command.trim();
|
const cmd = this.command.trim();
|
||||||
if (!cmd || this.booting) return;
|
if (!cmd || this.booting) return;
|
||||||
|
|||||||
Reference in new issue
Block a user