mirror of
https://github.com/coollabsio/coolify.git
synced 2025-12-28 05:34:50 +00:00
Fix color highlighting not applying on initial runtime logs load
Added morph.added hook to apply color highlighting when logs are first loaded. The morph.updated hook only fires on subsequent updates, not on initial DOM insertion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8a4303cc02
commit
334fd2500f
@ -192,16 +192,28 @@
|
||||
this.applySearch();
|
||||
});
|
||||
|
||||
// Apply colors after Livewire updates
|
||||
// Handler for applying colors and search after DOM changes
|
||||
const applyAfterUpdate = () => {
|
||||
this.$nextTick(() => {
|
||||
this.applyColorLogs();
|
||||
this.applySearch();
|
||||
if (this.alwaysScroll) {
|
||||
this.scrollToBottom();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Apply colors after Livewire updates (existing content)
|
||||
Livewire.hook('morph.updated', ({ el }) => {
|
||||
if (el.id === 'logs') {
|
||||
this.$nextTick(() => {
|
||||
this.applyColorLogs();
|
||||
this.applySearch();
|
||||
if (this.alwaysScroll) {
|
||||
this.scrollToBottom();
|
||||
}
|
||||
});
|
||||
applyAfterUpdate();
|
||||
}
|
||||
});
|
||||
|
||||
// Apply colors after Livewire adds new content (initial load)
|
||||
Livewire.hook('morph.added', ({ el }) => {
|
||||
if (el.id === 'logs') {
|
||||
applyAfterUpdate();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user