diff --git a/components/RoutePersistence.tsx b/components/RoutePersistence.tsx index aa146d4..a765ec9 100644 --- a/components/RoutePersistence.tsx +++ b/components/RoutePersistence.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; -import { storage } from '@/utils/storage'; +import { storage } from '@/utils/chromeStorage'; const RoutePersistence = () => { const location = useLocation(); diff --git a/utils/storage.ts b/utils/chromeStorage.ts similarity index 100% rename from utils/storage.ts rename to utils/chromeStorage.ts diff --git a/utils/messages.tsx b/utils/messages.tsx index 65dc66a..885ef82 100644 --- a/utils/messages.tsx +++ b/utils/messages.tsx @@ -1,37 +1,5 @@ import { defineExtensionMessaging } from '@webext-core/messaging'; -export const messages = { - popup: { - from: { - start: 'popup:start', - stop: 'popup:stop', - }, - to: { - stopped: 'popup:stopped', - started: 'popup:started', - tabChanged: 'popup:tab-changed', - }, - checkStatus: 'popup:check-status', - ready: 'popup:ready', - }, - content: { - from: { - saveTrackEvents: 'content:save-track-events', - }, - to: { - startRecording: 'content:start-recording', - stopRecording: 'content:stop-recording', - }, - checkStatus: 'content:check-status', - }, - offscreen: { - to: { - startRecording: 'offscreen:start-recording', - stopRecording: 'offscreen:stop-recording', - }, - }, -}; - interface ProtocolMap { // --- Popup 相关 --- 'popup:start': () => { ok: boolean; error?: string };