From 28b7225c4d578e2249630f88d8aa3dfa83f90639 Mon Sep 17 00:00:00 2001 From: fofolee Date: Mon, 24 Feb 2025 13:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E6=B7=BB=E5=8A=A0=E7=AA=97=E5=8F=A3=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/lib/quickcomposer/browser/client.js | 2 ++ src/js/composer/commands/browserCommands.js | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugin/lib/quickcomposer/browser/client.js b/plugin/lib/quickcomposer/browser/client.js index 38a402c..df5451d 100644 --- a/plugin/lib/quickcomposer/browser/client.js +++ b/plugin/lib/quickcomposer/browser/client.js @@ -119,6 +119,7 @@ const startClient = async (options) => { proxy = null, browserPath = getBrowserPath(browserType), windowSize = null, + windowPosition = null, incognito = false, headless = false, disableExtensions = false, @@ -150,6 +151,7 @@ const startClient = async (options) => { const optionArgs = [ windowSize ? `--window-size=${windowSize}` : "--start-maximized", + windowPosition ? `--window-position=${windowPosition}` : "", proxy ? `--proxy-server=${proxy}` : "", incognito ? incognitoArg[browserType] : "", headless ? "--headless" : "", diff --git a/src/js/composer/commands/browserCommands.js b/src/js/composer/commands/browserCommands.js index 79e7655..fae4556 100644 --- a/src/js/composer/commands/browserCommands.js +++ b/src/js/composer/commands/browserCommands.js @@ -81,11 +81,18 @@ export const browserCommands = { width: 3, }, windowSize: { - label: "窗口尺寸", + label: "窗口尺寸(格式:宽,高)", component: "VariableInput", icon: "window", width: 6, - placeholder: "如1920x1080,不设置则最大化", + placeholder: "如「1280,720」不设置则最大化", + }, + windowPosition: { + label: "窗口位置(格式:x,y)", + component: "VariableInput", + icon: "location_on", + width: 6, + placeholder: "如「160,120」不设置为0,0", }, proxy: { label: "代理", @@ -98,7 +105,7 @@ export const browserCommands = { label: "浏览器路径", component: "VariableInput", icon: "folder", - width: 12, + width: 6, options: { dialog: { type: "open",