From f122b9756b2dfdb97ed6dbf24896f9c8b6fc5929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=80=E1=B4=8D=E1=B4=9B=E1=B4=8F=E1=B4=80=E1=B4=87?= =?UTF-8?q?=CA=80?= Date: Sun, 11 Jan 2026 21:42:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=82=E5=BD=93=E6=89=A9=E5=A4=A7?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=97=A5=E5=BF=97=E7=9A=84=E5=AE=B9=E9=87=8F?= =?UTF-8?q?=20(#602)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/bili_sync/src/api/routes/ws/log_helper.rs | 2 +- web/src/routes/logs/+page.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bili_sync/src/api/routes/ws/log_helper.rs b/crates/bili_sync/src/api/routes/ws/log_helper.rs index 6c7de25..517c29d 100644 --- a/crates/bili_sync/src/api/routes/ws/log_helper.rs +++ b/crates/bili_sync/src/api/routes/ws/log_helper.rs @@ -5,7 +5,7 @@ use parking_lot::RwLock; use tokio::sync::broadcast; use tracing_subscriber::fmt::MakeWriter; -pub const MAX_HISTORY_LOGS: usize = 30; +pub const MAX_HISTORY_LOGS: usize = 200; /// LogHelper 维护了日志发送器和一个日志历史记录的缓冲区 pub struct LogHelper { diff --git a/web/src/routes/logs/+page.svelte b/web/src/routes/logs/+page.svelte index 618cfaf..d38ec29 100644 --- a/web/src/routes/logs/+page.svelte +++ b/web/src/routes/logs/+page.svelte @@ -27,7 +27,7 @@ main = document.getElementById('main'); main?.addEventListener('scroll', checkScrollPosition); unsubscribeLog = api.subscribeToLogs((data: string) => { - logs = [...logs.slice(-200), JSON.parse(data)]; + logs = [...logs.slice(-499), JSON.parse(data)]; setTimeout(scrollToBottom, 0); }); return () => {