From 322cd6dcd674ecdef38fc618c4e6d5bbb4049312 Mon Sep 17 00:00:00 2001 From: go0p Date: Wed, 19 Feb 2025 23:36:56 +0800 Subject: [PATCH] todo switch --- public/proxy.js | 22 +--------------------- public/types/action.js | 1 - 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/public/proxy.js b/public/proxy.js index f202272..5ca555a 100644 --- a/public/proxy.js +++ b/public/proxy.js @@ -437,7 +437,7 @@ export function setupProxyHandlers() { })(); return true; - case 'OPEN_OPTIONS_PAGE': + case ProxyActionType.OPEN_OPTIONS_PAGE: // 打开选项页 chrome.tabs.create({ url: chrome.runtime.getURL('/proxy/options.html') @@ -458,26 +458,6 @@ export function setupProxyHandlers() { }); sendResponse({ success: true }); return true; - - case 'PROXY_GET_STATUS': - return handleGetProxyStatus(sendResponse); - - case 'PROXY_GET_CONFIGS': - (async () => { - try { - const configs = await proxyStore.getProxyConfigs(); - sendResponse({ success: true, data: configs }); - } catch (error) { - console.error('Error getting proxy configs:', error); - sendResponse({ success: false, error: error.message }); - } - })(); - return true; - - case 'PROXY_SET_CONFIG': - return handleSetProxyConfig(msg.config, sendResponse); - - case 'PROXY_CLEAR_CONFIG': return handleClearProxyConfig(sendResponse); } }); diff --git a/public/types/action.js b/public/types/action.js index 823e750..0fb8da0 100644 --- a/public/types/action.js +++ b/public/types/action.js @@ -9,5 +9,4 @@ export const ProxyActionType = { GET_PROXY_CONFIGS: "GET_PROXY_CONFIGS", ADD_PROXY_CONFIG: "ADD_PROXY_CONFIG", UPDATE_PROXY_CONFIG: "UPDATE_PROXY_CONFIG", - ADD_AND_ENABLE_PROXY: 'ADD_AND_ENABLE_PROXY' }; \ No newline at end of file