From 23a096c3f787035150262d4cf7d2411371bd714c Mon Sep 17 00:00:00 2001 From: Aisland Date: Wed, 2 Sep 2026 18:25:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(console):=20=E6=B5=81=E5=85=89=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E6=9C=80=E5=B0=8F=E5=88=B0=200=3D=E5=AE=8C=E5=85=A8?= =?UTF-8?q?=E4=B8=8D=E5=8A=A8=EF=BC=88=E6=97=B6=E9=95=BF=E8=BF=91=E6=97=A0?= =?UTF-8?q?=E7=A9=B7=EF=BC=8C=E5=85=89=E6=96=91=E9=9D=99=E6=AD=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 01_content/lib/client.js | 14 +++++++------- 01_content/src/client/index.tsx | 4 ++-- 01_content/src/client/locales.ts | 4 ++-- 01_content/src/client/split.tsx | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/01_content/lib/client.js b/01_content/lib/client.js index fd2e74b..38c8aa7 100644 --- a/01_content/lib/client.js +++ b/01_content/lib/client.js @@ -8534,7 +8534,7 @@ var zh = { "console.bgTipT": "\u7F51\u683C\u7EBF\u900F\u660E\u5EA6", "console.bgTipH": "\u8272\u76F8", "console.bgTipS": "\u9971\u548C\u5EA6", - "console.bgTipSpeed": "\u6D41\u5149\u79FB\u52A8\u901F\u5EA6\uFF0850=\u9ED8\u8BA4\uFF0C100 \u6700\u5FEB 2\xD7\uFF09", + "console.bgTipSpeed": "\u6D41\u5149\u79FB\u52A8\u901F\u5EA6\uFF080=\u5B8C\u5168\u4E0D\u52A8\uFF0C50=\u9ED8\u8BA4\uFF0C100 \u6700\u5FEB 2\xD7\uFF09", "console.bgTipL": "\u660E\u5EA6", "console.shapeSquare": "\u65B9\u5F62", "console.shapeCircle": "\u5706\u5F62", @@ -8754,7 +8754,7 @@ var en = { "console.bgTipT": "Grid opacity", "console.bgTipH": "Hue", "console.bgTipS": "Saturation", - "console.bgTipSpeed": "Glow speed (50 = default, 100 = 2\xD7 fastest)", + "console.bgTipSpeed": "Glow speed (0 = still, 50 = default, 100 = 2\xD7 fastest)", "console.bgTipL": "Lightness", "console.shapeSquare": "Square", "console.shapeCircle": "Circle", @@ -18238,7 +18238,7 @@ function ConsolePane() { } }; const onGlowSpeed = (n) => { - const v = Math.min(Math.max(Math.round(n), 25), 100); + const v = Math.min(Math.max(Math.round(n), 0), 100); setGlowSpeedState(v); splitEnv?.console?.setGlowSpeed?.(v); }; @@ -18558,7 +18558,7 @@ function ConsolePane() { { mode: "light", key: "console.themeLight" }, { mode: "system", key: "console.themeSystem" } ]; - return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-wt_console", "data-wt-theme": resolvedTheme, "data-wt-shape": shape, "data-wt-bg": bg, "data-wt-grid": bg === "photo" && !photoGrid ? "off" : "on", style: { ...bg === "plain" ? { ["--wt-bg"]: "hsl(" + plainHsl.h + ", " + plainHsl.s + "%, " + plainHsl.l + "%)", ["--wt-gridPlain"]: "rgba(255,255,255," + plainGrid / 100 + ")", ["--wt-gridPlainLight"]: "rgba(27,31,36," + plainGrid / 100 + ")" } : {}, ...bg === "glow" ? { ["--wt-gridGlow"]: "rgba(255,255,255," + glowGrid / 100 + ")", ["--wt-gridGlowLight"]: "rgba(27,31,36," + glowGrid / 100 + ")", ["--wt-glowScale"]: String(50 / glowSpeed) } : {}, ...bg === "photo" ? { ["--wt-gridPhoto"]: "rgba(255,255,255," + gridOpacity / 100 + ")" } : {}, ["--wt-cardBlur"]: (bg === "plain" ? plainBlur : bg === "glow" ? glowBlur : cardBlur) + "px" }, children: [ + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-wt_console", "data-wt-theme": resolvedTheme, "data-wt-shape": shape, "data-wt-bg": bg, "data-wt-grid": bg === "photo" && !photoGrid ? "off" : "on", style: { ...bg === "plain" ? { ["--wt-bg"]: "hsl(" + plainHsl.h + ", " + plainHsl.s + "%, " + plainHsl.l + "%)", ["--wt-gridPlain"]: "rgba(255,255,255," + plainGrid / 100 + ")", ["--wt-gridPlainLight"]: "rgba(27,31,36," + plainGrid / 100 + ")" } : {}, ...bg === "glow" ? { ["--wt-gridGlow"]: "rgba(255,255,255," + glowGrid / 100 + ")", ["--wt-gridGlowLight"]: "rgba(27,31,36," + glowGrid / 100 + ")", ["--wt-glowScale"]: glowSpeed === 0 ? "100000000" : String(50 / glowSpeed) } : {}, ...bg === "photo" ? { ["--wt-gridPhoto"]: "rgba(255,255,255," + gridOpacity / 100 + ")" } : {}, ["--wt-cardBlur"]: (bg === "plain" ? plainBlur : bg === "glow" ? glowBlur : cardBlur) + "px" }, children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dsh-wt_consoleBg", "aria-hidden": true, style: bg === "glow" && (glowHsl.h !== 0 || glowHsl.s !== 100 || glowHsl.l !== 100) ? { filter: "hue-rotate(" + glowHsl.h + "deg) saturate(" + glowHsl.s + "%) brightness(" + glowHsl.l + "%)" } : void 0, children: [ bg === "photo" && (bgVideo ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConsoleVideo, { src: bgVideo, style: photoHsl.h !== 0 || photoHsl.s !== 100 || photoHsl.l !== 100 ? { filter: "hue-rotate(" + photoHsl.h + "deg) saturate(" + photoHsl.s + "%) brightness(" + photoHsl.l + "%)" } : void 0 }) : bgPhoto ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { className: "dsh-wt_consoleMedia", src: bgPhoto, alt: "", style: photoHsl.h !== 0 || photoHsl.s !== 100 || photoHsl.l !== 100 ? { filter: "hue-rotate(" + photoHsl.h + "deg) saturate(" + photoHsl.s + "%) brightness(" + photoHsl.l + "%)" } : void 0 }) : null), bg === "glow" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ @@ -18767,8 +18767,8 @@ function ConsolePane() { return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ bgEdit === "glow" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-wt_hslRow", "data-tip": T("console.bgTipSpeed"), children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-wt_hslLabel", children: "S" }), - /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { className: "dsh-wt_hslSlider", type: "range", min: 25, max: 100, step: 5, value: glowSpeed, onChange: (e) => onGlowSpeed(Number(e.target.value)) }), - /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HslValInput, { value: glowSpeed, min: 25, max: 100, onCommit: onGlowSpeed }) + /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { className: "dsh-wt_hslSlider", type: "range", min: 0, max: 100, step: 5, value: glowSpeed, onChange: (e) => onGlowSpeed(Number(e.target.value)) }), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HslValInput, { value: glowSpeed, min: 0, max: 100, onCommit: onGlowSpeed }) ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-wt_hslRow", "data-tip": T("console.bgTipB"), children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-wt_hslLabel", children: "B" }), @@ -20230,7 +20230,7 @@ function loadView() { consoleBgGlowBlur: typeof p.consoleBgGlowBlur === "number" && p.consoleBgGlowBlur >= 0 && p.consoleBgGlowBlur <= 20 ? Math.round(p.consoleBgGlowBlur) : void 0, consoleBgPlainGrid: typeof p.consoleBgPlainGrid === "number" && p.consoleBgPlainGrid >= 0 && p.consoleBgPlainGrid <= 30 ? Math.round(p.consoleBgPlainGrid) : void 0, consoleBgGlowGrid: typeof p.consoleBgGlowGrid === "number" && p.consoleBgGlowGrid >= 0 && p.consoleBgGlowGrid <= 30 ? Math.round(p.consoleBgGlowGrid) : void 0, - consoleGlowSpeed: typeof p.consoleGlowSpeed === "number" && p.consoleGlowSpeed >= 25 && p.consoleGlowSpeed <= 100 ? Math.round(p.consoleGlowSpeed) : void 0, + consoleGlowSpeed: typeof p.consoleGlowSpeed === "number" && p.consoleGlowSpeed >= 0 && p.consoleGlowSpeed <= 100 ? Math.round(p.consoleGlowSpeed) : void 0, consoleBgPhotoHsls: (() => { const src = p.consoleBgPhotoHsls; if (!src || typeof src !== "object") return void 0; diff --git a/01_content/src/client/index.tsx b/01_content/src/client/index.tsx index 9e1759d..07bfcdc 100644 --- a/01_content/src/client/index.tsx +++ b/01_content/src/client/index.tsx @@ -96,7 +96,7 @@ type ViewState = { /** 按背景记忆:纯色/流光的网格线不透明度 %(0-30,默认 5 / 8)*/ consoleBgPlainGrid?: number consoleBgGlowGrid?: number - /** 流光移动速度(25-100,默认 50 = 原速×1;100 = 2× 快)*/ + /** 流光移动速度(0-100,默认 50 = 原速×1;0 = 完全不动;100 = 2× 快)*/ consoleGlowSpeed?: number } @@ -347,7 +347,7 @@ function loadView(): ViewState { consoleBgGlowBlur: typeof p.consoleBgGlowBlur === 'number' && p.consoleBgGlowBlur >= 0 && p.consoleBgGlowBlur <= 20 ? Math.round(p.consoleBgGlowBlur) : undefined, consoleBgPlainGrid: typeof p.consoleBgPlainGrid === 'number' && p.consoleBgPlainGrid >= 0 && p.consoleBgPlainGrid <= 30 ? Math.round(p.consoleBgPlainGrid) : undefined, consoleBgGlowGrid: typeof p.consoleBgGlowGrid === 'number' && p.consoleBgGlowGrid >= 0 && p.consoleBgGlowGrid <= 30 ? Math.round(p.consoleBgGlowGrid) : undefined, - consoleGlowSpeed: typeof p.consoleGlowSpeed === 'number' && p.consoleGlowSpeed >= 25 && p.consoleGlowSpeed <= 100 ? Math.round(p.consoleGlowSpeed) : undefined, + consoleGlowSpeed: typeof p.consoleGlowSpeed === 'number' && p.consoleGlowSpeed >= 0 && p.consoleGlowSpeed <= 100 ? Math.round(p.consoleGlowSpeed) : undefined, consoleBgPhotoHsls: (() => { const src = p.consoleBgPhotoHsls if (!src || typeof src !== 'object') return undefined diff --git a/01_content/src/client/locales.ts b/01_content/src/client/locales.ts index 5c569ae..2f8fcc9 100644 --- a/01_content/src/client/locales.ts +++ b/01_content/src/client/locales.ts @@ -141,7 +141,7 @@ export const zh = { 'console.bgTipT': '网格线透明度', 'console.bgTipH': '色相', 'console.bgTipS': '饱和度', - 'console.bgTipSpeed': '流光移动速度(50=默认,100 最快 2×)', + 'console.bgTipSpeed': '流光移动速度(0=完全不动,50=默认,100 最快 2×)', 'console.bgTipL': '明度', 'console.shapeSquare': '方形', 'console.shapeCircle': '圆形', @@ -366,7 +366,7 @@ export const en = { 'console.bgTipT': 'Grid opacity', 'console.bgTipH': 'Hue', 'console.bgTipS': 'Saturation', - 'console.bgTipSpeed': 'Glow speed (50 = default, 100 = 2× fastest)', + 'console.bgTipSpeed': 'Glow speed (0 = still, 50 = default, 100 = 2× fastest)', 'console.bgTipL': 'Lightness', 'console.shapeSquare': 'Square', 'console.shapeCircle': 'Circle', diff --git a/01_content/src/client/split.tsx b/01_content/src/client/split.tsx index 7c8513d..7c1ff4c 100644 --- a/01_content/src/client/split.tsx +++ b/01_content/src/client/split.tsx @@ -1677,7 +1677,7 @@ function ConsolePane() { else { setGlowGridState(v); splitEnv?.console?.setGlowGrid?.(v) } } const onGlowSpeed = (n: number) => { - const v = Math.min(Math.max(Math.round(n), 25), 100) + const v = Math.min(Math.max(Math.round(n), 0), 100) setGlowSpeedState(v) splitEnv?.console?.setGlowSpeed?.(v) } @@ -1945,7 +1945,7 @@ function ConsolePane() { { mode: 'system', key: 'console.themeSystem' }, ] return ( -
+
{bg === 'photo' && (bgVideo ? @@ -2105,7 +2105,7 @@ function ConsolePane() { const lMax = bgEdit === 'plain' ? 100 : 200 return (<> {bgEdit === 'glow' && ( -
S onGlowSpeed(Number(e.target.value))} />
+
S onGlowSpeed(Number(e.target.value))} />
)}
B onModeBlur(bgEdit, Number(e.target.value))} /> onModeBlur(bgEdit, n)} />
T bgEdit === 'photo' ? onGridOpacity(Number(e.target.value)) : onModeGrid(bgEdit, Number(e.target.value))} /> bgEdit === 'photo' ? onGridOpacity(n) : onModeGrid(bgEdit, n)} />