From 4d3f4f7a4b1540e36b57e438768ab6e7adce297e Mon Sep 17 00:00:00 2001 From: lkddi Date: Sat, 25 Apr 2026 02:50:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=8B=E5=8A=A8=E5=AD=98?= =?UTF-8?q?=E7=82=B9=E9=80=9A=E7=9F=A5=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/chat/partials/scripts.blade.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/views/chat/partials/scripts.blade.php b/resources/views/chat/partials/scripts.blade.php index 0cc3586..7a3a5de 100644 --- a/resources/views/chat/partials/scripts.blade.php +++ b/resources/views/chat/partials/scripts.blade.php @@ -2508,15 +2508,15 @@ msg.is_secret || msg.to_user === window.chatContext.username; - // 自动存点通知:标记 data-autosave 属性,每次渲染时先删除旧的,实现"滚动替换"效果 + // 存点通知:标记 data-autosave 属性,每次渲染时先删除旧的,实现"滚动替换"效果 const isAutoSave = (msg.from_user === '系统' || msg.from_user === '') && - msg.content && msg.content.includes('自动存点'); + msg.content && (msg.content.includes('自动存点') || msg.content.includes('手动存点')); if (isAutoSave) { div.dataset.autosave = '1'; } if (isRelatedToMe) { - // 删除旧的自动存点通知,保持包厢窗口整洁 + // 删除旧的存点通知,保持包厢窗口整洁 if (isAutoSave) { container2.querySelectorAll('[data-autosave="1"]').forEach(el => el.remove()); } @@ -3745,8 +3745,11 @@ if (!silent) { const detailDiv = document.createElement('div'); detailDiv.className = 'msg-line'; + detailDiv.dataset.autosave = '1'; detailDiv.innerHTML = `${escapeHtml(levelInfo + gainInfo)}(${timeStr})`; + // 手动存点和自动存点共用同一条界面占位,避免包厢窗口堆积旧存点通知。 + container2.querySelectorAll('[data-autosave="1"]').forEach(el => el.remove()); container2.appendChild(detailDiv); if (autoScroll) container2.scrollTop = container2.scrollHeight; } else {