fix: autorefresh logs

Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
Omar Sánchez Pizarro
2026-01-19 22:49:43 +01:00
parent 75fa59807c
commit 2d71f46149

View File

@@ -167,10 +167,13 @@ watch(filteredLogs, async () => {
function handleWSMessage(event) { function handleWSMessage(event) {
const data = event.detail; const data = event.detail;
if (data.type === 'logs_updated') { if (data.type === 'logs_updated') {
// Solo actualizar si auto-refresh está activado
if (autoRefresh.value) {
// Al recibir actualización de WebSocket, cargar logs con seguimiento si está activado // Al recibir actualización de WebSocket, cargar logs con seguimiento si está activado
loadLogs(followLatestLog.value); loadLogs(followLatestLog.value);
} }
} }
}
onMounted(() => { onMounted(() => {
loadLogs(true); // Primera carga siempre hace scroll loadLogs(true); // Primera carga siempre hace scroll