From b441b1332070bee47ada0c990344b91c69ba949a Mon Sep 17 00:00:00 2001 From: josedario87 Date: Tue, 25 Nov 2025 01:29:16 -0600 Subject: [PATCH] =?UTF-8?q?Feature:=20Filtros=20toggleables=20para=20todos?= =?UTF-8?q?=20los=20tipos=20de=20sesi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Activas: visibles por defecto, click para ocultar - Finalizadas: ocultas por defecto, click para mostrar - Stale: ocultas por defecto, click para mostrar - Indicador visual con ícono ojo abierto/cerrado y ring highlight - Mensaje informativo de sesiones ocultas por tipo --- frontend/src/App.vue | 54 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 1897946..2be3c02 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -261,10 +261,16 @@ const pagedDevices = computed(() => devicesAll.value.slice(devicePage.value*page watch([devicesAll, () => layoutMode.value], () => { devicePage.value = 0; }); const sessionPage = ref(0); +const showActiveSessions = ref(true); const showStaleSessions = ref(false); +const showStoppedSessions = ref(false); const filteredSessions = computed(() => { - if (showStaleSessions.value) return sessions.value; - return sessions.value.filter(s => s.status !== 'stale'); + return sessions.value.filter(s => { + if (s.status === 'active' && !showActiveSessions.value) return false; + if (s.status === 'stale' && !showStaleSessions.value) return false; + if (s.status === 'stopped' && !showStoppedSessions.value) return false; + return true; + }); }); const pagedSessions = computed(() => filteredSessions.value.slice(sessionPage.value*pageSize, sessionPage.value*pageSize + pageSize)); watch([filteredSessions, () => layoutMode.value], () => { sessionPage.value = 0; }); @@ -544,14 +550,40 @@ async function handleUserFormSubmit(data) {
- - - - + + + + + + + + Activas: {{ sessionStats.active }} - Finalizadas: {{ sessionStats.stopped }} + + + + + + + + + + Finalizadas: {{ sessionStats.stopped }} +
Cargando sesiones...
- {{ sessions.length ? 'No hay sesiones activas (hay ' + sessionStats.stale + ' stale ocultas)' : 'No hay sesiones' }} + +