mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-17 00:14:43 +00:00
fix(logs): preserve manual follow state and hide filtered lines
This commit is contained in:
1 parent
3bcef578de
commit
447a26568e
4 files changed
+34
-2
No files matched your search
@@ -17,6 +17,7 @@
|
||||
<div x-data="{
|
||||
fullscreen: @entangle('fullscreen'),
|
||||
alwaysScroll: {{ $isKeepAliveOn ? 'true' : 'false' }},
|
||||
followManuallyDisabled: false,
|
||||
rafId: null,
|
||||
scrollTimeout: null,
|
||||
scrollDebounce: null,
|
||||
@@ -90,7 +91,7 @@
|
||||
this.scrollDebounce = setTimeout(() => {
|
||||
if (this.destroyed) return;
|
||||
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
||||
if (!this.alwaysScroll && distanceFromBottom <= 10) {
|
||||
if (!this.alwaysScroll && !this.followManuallyDisabled && distanceFromBottom <= 10) {
|
||||
this.alwaysScroll = true;
|
||||
this.scheduleScroll();
|
||||
}
|
||||
@@ -109,8 +110,10 @@
|
||||
toggleScroll() {
|
||||
this.alwaysScroll = !this.alwaysScroll;
|
||||
if (this.alwaysScroll) {
|
||||
this.followManuallyDisabled = false;
|
||||
this.scheduleScroll();
|
||||
} else {
|
||||
this.followManuallyDisabled = true;
|
||||
this.cancelScrollLoop();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user