feat: add Escape key support to exit fullscreen logs view
This commit is contained in:
parent
6b88481ce2
commit
8d20d50937
1 changed files with 25 additions and 19 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="{{ $collapsible ? 'my-4 border dark:border-coolgray-200 border-neutral-200' : '' }}">
|
<div class="{{ $collapsible ? 'my-4 border dark:border-coolgray-200 border-neutral-200' : '' }}">
|
||||||
<div id="screen" x-data="{
|
<div id="screen" x-data="{
|
||||||
collapsible: {{ $collapsible ? 'true' : 'false' }},
|
collapsible: {{ $collapsible ? 'true' : 'false' }},
|
||||||
expanded: {{ ($expandByDefault || !$collapsible) ? 'true' : 'false' }},
|
expanded: {{ ($expandByDefault || !$collapsible) ? 'true' : 'false' }},
|
||||||
logsLoaded: false,
|
logsLoaded: false,
|
||||||
|
|
@ -17,6 +17,12 @@
|
||||||
clearInterval(this.intervalId);
|
clearInterval(this.intervalId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleKeyDown(event) {
|
||||||
|
if (event.key === 'Escape' && this.fullscreen) {
|
||||||
|
this.makeFullscreen();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
} @keydown.window="handleKeyDown($event)">
|
||||||
isScrolling: false,
|
isScrolling: false,
|
||||||
toggleScroll() {
|
toggleScroll() {
|
||||||
this.alwaysScroll = !this.alwaysScroll;
|
this.alwaysScroll = !this.alwaysScroll;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue