From ce8376458ed688ae7c118bfde13e8bba84c953c4 Mon Sep 17 00:00:00 2001 From: NanamiAdmin Date: Tue, 17 Mar 2026 19:24:05 +0800 Subject: [PATCH] feat(logs): replace API polling with WebSocket for real-time updates Implement WebSocket connection to receive live log updates instead of periodic API polling. The changes include: - Add WebSocket connection management with token authentication - Implement computed property for log filtering - Maintain only the latest 100 logs in memory - Handle WebSocket events and errors appropriately --- src/views/Logs.vue | 92 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 18 deletions(-) diff --git a/src/views/Logs.vue b/src/views/Logs.vue index eb118ff..35d75bf 100644 --- a/src/views/Logs.vue +++ b/src/views/Logs.vue @@ -3,7 +3,7 @@
-
-
+
+
{{ log.time }} {{ log.level }} {{ log.message }} @@ -29,37 +29,93 @@