From 572caf0be7a2530adc6e239872f3e97bcbd6c903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 15 Nov 2024 14:19:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=9A*.vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/src/modules/plugin/node/index.js | 4 +- packages/gui/src/bridge/update/front.js | 4 +- packages/gui/src/view/App.vue | 97 ++-- packages/gui/src/view/api.js | 2 +- .../gui/src/view/components/container.vue | 19 +- packages/gui/src/view/components/setup-ca.vue | 107 ++-- packages/gui/src/view/pages/index.vue | 276 ++++----- packages/gui/src/view/pages/plugin/git.vue | 128 ++--- packages/gui/src/view/pages/plugin/node.vue | 139 ++--- .../gui/src/view/pages/plugin/overwall.vue | 250 ++++---- packages/gui/src/view/pages/plugin/pip.vue | 134 ++--- packages/gui/src/view/pages/proxy.vue | 195 ++++--- packages/gui/src/view/pages/server.vue | 533 ++++++++++-------- packages/gui/src/view/pages/setting.vue | 358 ++++++------ .../src/lib/interceptor/impl/req/baiduOcr.js | 4 +- .../mitmproxy/src/lib/interceptor/index.js | 2 +- .../mitmproxy/src/lib/proxy/common/util.js | 2 +- 17 files changed, 1160 insertions(+), 1094 deletions(-) diff --git a/packages/core/src/modules/plugin/node/index.js b/packages/core/src/modules/plugin/node/index.js index 011c573..d26adc1 100644 --- a/packages/core/src/modules/plugin/node/index.js +++ b/packages/core/src/modules/plugin/node/index.js @@ -45,7 +45,7 @@ const NodePlugin = function (context) { const cmds = [] for (const item of list) { - if (item.value != null && item.value.length > 0 && item.value !== 'null') { + if (item.value != null && item.value.length > 0 && item.value !== 'default') { cmds.push(`${command} config set ${item.key} ${item.value}`) } else { cmds.push(`${command} config delete ${item.key}`) @@ -68,7 +68,7 @@ const NodePlugin = function (context) { const cmds = [] log.debug('yarn set:', JSON.stringify(list)) for (const item of list) { - if (item.value != null && item.value.length > 0 && item.value !== 'null') { + if (item.value != null && item.value.length > 0 && item.value !== 'default') { cmds.push(`yarn config set ${item.key} ${item.value}`) } else { cmds.push(`yarn config delete ${item.key}`) diff --git a/packages/gui/src/bridge/update/front.js b/packages/gui/src/bridge/update/front.js index 3cfa1b8..0705894 100644 --- a/packages/gui/src/bridge/update/front.js +++ b/packages/gui/src/bridge/update/front.js @@ -155,7 +155,7 @@ function install (app, api) { return (
发布公告:https://github.com/docmirror/dev-sidecar/releases
-
+
                   {releaseNotes}
                 
@@ -201,7 +201,7 @@ function install (app, api) { return (
发布公告:https://github.com/docmirror/dev-sidecar/releases
-
+
                   {releaseNotes}
                 
diff --git a/packages/gui/src/view/App.vue b/packages/gui/src/view/App.vue index 2905e37..a2f847e 100644 --- a/packages/gui/src/view/App.vue +++ b/packages/gui/src/view/App.vue @@ -1,49 +1,7 @@ - - + + diff --git a/packages/gui/src/view/components/setup-ca.vue b/packages/gui/src/view/components/setup-ca.vue index 6c71e2a..8ad8fa9 100644 --- a/packages/gui/src/view/components/setup-ca.vue +++ b/packages/gui/src/view/components/setup-ca.vue @@ -1,66 +1,23 @@ - - - + diff --git a/packages/gui/src/view/pages/index.vue b/packages/gui/src/view/pages/index.vue index 91b3077..d8f2f02 100644 --- a/packages/gui/src/view/pages/index.vue +++ b/packages/gui/src/view/pages/index.vue @@ -1,132 +1,13 @@ - - + + + diff --git a/packages/gui/src/view/pages/plugin/overwall.vue b/packages/gui/src/view/pages/plugin/overwall.vue index 5823797..c6f062f 100644 --- a/packages/gui/src/view/pages/plugin/overwall.vue +++ b/packages/gui/src/view/pages/plugin/overwall.vue @@ -1,3 +1,108 @@ + + - - - diff --git a/packages/gui/src/view/pages/plugin/pip.vue b/packages/gui/src/view/pages/plugin/pip.vue index 814a8d6..6d55a50 100644 --- a/packages/gui/src/view/pages/plugin/pip.vue +++ b/packages/gui/src/view/pages/plugin/pip.vue @@ -1,31 +1,76 @@ + + - - - - diff --git a/packages/gui/src/view/pages/proxy.vue b/packages/gui/src/view/pages/proxy.vue index 1ee52f7..51c361b 100644 --- a/packages/gui/src/view/pages/proxy.vue +++ b/packages/gui/src/view/pages/proxy.vue @@ -1,14 +1,85 @@ + + - - - diff --git a/packages/gui/src/view/pages/server.vue b/packages/gui/src/view/pages/server.vue index b5f25e7..a094000 100644 --- a/packages/gui/src/view/pages/server.vue +++ b/packages/gui/src/view/pages/server.vue @@ -1,247 +1,12 @@ - - + + + + + diff --git a/packages/mitmproxy/src/lib/interceptor/impl/req/baiduOcr.js b/packages/mitmproxy/src/lib/interceptor/impl/req/baiduOcr.js index 8b8e666..dcce587 100644 --- a/packages/mitmproxy/src/lib/interceptor/impl/req/baiduOcr.js +++ b/packages/mitmproxy/src/lib/interceptor/impl/req/baiduOcr.js @@ -171,7 +171,9 @@ module.exports = { res.writeHead(200, headers) res.write(JSON.stringify(result)) // 格式如:{"words_result":[{"words":"6525"}],"words_result_num":1,"log_id":1818877093747960000} res.end() - if (next) next() // 异步执行完继续next + if (next) { + next() // 异步执行完继续next + } }).catch((err) => { log.info('baiduOcr error:', err) res.writeHead(200, headers) diff --git a/packages/mitmproxy/src/lib/interceptor/index.js b/packages/mitmproxy/src/lib/interceptor/index.js index 5a1cbf7..a37b6f5 100644 --- a/packages/mitmproxy/src/lib/interceptor/index.js +++ b/packages/mitmproxy/src/lib/interceptor/index.js @@ -30,5 +30,5 @@ module.exports = [ // response interceptor impls OPTIONSHeaders, cacheRes, responseReplace, - script + script, ] diff --git a/packages/mitmproxy/src/lib/proxy/common/util.js b/packages/mitmproxy/src/lib/proxy/common/util.js index ec7aca0..0ab2a04 100644 --- a/packages/mitmproxy/src/lib/proxy/common/util.js +++ b/packages/mitmproxy/src/lib/proxy/common/util.js @@ -21,7 +21,7 @@ function getTimeoutConfig (hostname, serverSetting) { return { timeout: timeoutConfig.timeout || serverSetting.defaultTimeout || 20000, - keepAliveTimeout: timeoutConfig.keepAliveTimeout || serverSetting.defaultKeepAliveTimeout || 30000 + keepAliveTimeout: timeoutConfig.keepAliveTimeout || serverSetting.defaultKeepAliveTimeout || 30000, } }