From 0b5e1c7e863c1fe0f7554c5a3ec1c6256bcb5e52 Mon Sep 17 00:00:00 2001 From: Aisland Date: Tue, 1 Sep 2026 21:41:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(console):=20=E4=B8=8A=E4=BC=A0=E5=AA=92?= =?UTF-8?q?=E4=BD=93=E8=A1=8C=E7=82=B9=E5=87=BB=3D=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=BD=93=E5=89=8D=E5=AA=92=E4=BD=93=E5=B9=B6?= =?UTF-8?q?=E6=94=B6=E8=B5=B7=E8=8F=9C=E5=8D=95=EF=BC=9B=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E6=BB=91=E6=9D=86=E6=89=8D=E8=BF=9B=E4=BA=8C=E7=BA=A7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=EF=BC=9B=E6=97=A0=E5=AA=92=E4=BD=93=E6=97=B6=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=87=AA=E5=8A=A8=E8=BF=9B=E4=BA=8C=E7=BA=A7=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 01_content/lib/client.js | 12 ++++++++++-- 01_content/src/client/split.tsx | 8 +++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/01_content/lib/client.js b/01_content/lib/client.js index 4690e2c..01a3d9b 100644 --- a/01_content/lib/client.js +++ b/01_content/lib/client.js @@ -17510,7 +17510,12 @@ function ConsolePane() { }; const onBg = (m) => { if (m === "photo") { - setBgEdit("photo"); + if (photoList.length === 0) { + setBgEdit("photo"); + return; + } + setBgState("photo"); + splitEnv?.console?.setBg?.("photo"); return; } setBgState(m); @@ -17800,7 +17805,10 @@ function ConsolePane() { /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-wt_dropGear", title: T("console.bgEdit"), "aria-label": T("console.bgEdit"), onClick: () => setBgEdit("glow"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderIcon, {}) }) ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-wt_dropRow", children: [ - /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "dsh-wt_dropItem" + (bg === "photo" ? " dsh-wt_dropItemOn" : ""), onClick: () => onBg("photo"), children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", className: "dsh-wt_dropItem" + (bg === "photo" ? " dsh-wt_dropItemOn" : ""), onClick: () => { + onBg("photo"); + setOpenMenu(null); + }, children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "13", height: "13", viewBox: "0 0 16 16", "aria-hidden": true, children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "2.5", y: "3.5", width: "11", height: "9", rx: "1.5", fill: "none", stroke: "currentColor", strokeWidth: "1.2" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "5.8", cy: "6.6", r: "1.1", fill: "currentColor" }), diff --git a/01_content/src/client/split.tsx b/01_content/src/client/split.tsx index f615c45..b36d807 100644 --- a/01_content/src/client/split.tsx +++ b/01_content/src/client/split.tsx @@ -1196,8 +1196,10 @@ function ConsolePane() { } const onBg = (m: 'plain' | 'glow' | 'photo') => { if (m === 'photo') { - // 上传照片 → 统一进入二级照片库菜单 - setBgEdit('photo') + // 直接切换到当前媒体;没有媒体时才进入二级菜单引导上传 + if (photoList.length === 0) { setBgEdit('photo'); return } + setBgState('photo') + splitEnv?.console?.setBg?.('photo') return } setBgState(m) @@ -1415,7 +1417,7 @@ function ConsolePane() {
- +