From 80e510225c58f62e93ca7ccf6cd40b47ee55f3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= Date: Sat, 21 Feb 2026 15:09:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(background):=20=E6=B7=BB=E5=8A=A0=E5=BD=95?= =?UTF-8?q?=E5=88=B6=E7=8A=B6=E6=80=81=E6=8C=81=E4=B9=85=E5=8C=96=E5=92=8C?= =?UTF-8?q?Tab=E5=88=87=E6=8D=A2=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 实现录制状态存储到本地storage,包括isRecording、recordingTabId、events和startTime - 添加loadRecorderState和saveRecorderState函数用于状态管理 - 监听Tab切换事件,当切换离开录制Tab时发出警告并通知popup - 监听Tab关闭事件,自动停止录制并清理状态 - 添加录制状态同步检查,确保content script状态一致 - 在开始录制前检查是否已在录制状态,避免重复录制 - 添加错误处理返回详细错误信息 - 优化回放HTML样式和脚本加载方式 - 添加Tab切换消息通信协议支持 --- components/TimestampExecution.tsx | 2 +- entrypoints/background.ts | 172 ++++++++++++++---- entrypoints/popup/pages/RecordeReplayPage.tsx | 11 +- utils/messages.tsx | 6 +- utils/recordUtils.tsx | 29 ++- 5 files changed, 166 insertions(+), 54 deletions(-) diff --git a/components/TimestampExecution.tsx b/components/TimestampExecution.tsx index 7ca6b07..a404562 100644 --- a/components/TimestampExecution.tsx +++ b/components/TimestampExecution.tsx @@ -76,7 +76,7 @@ export function TimestampExecution(): JSX.Element {