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() {
- +