feat(console): 上传媒体行点击=直接切换当前媒体并收起菜单;右侧滑杆才进二级菜单;无媒体时点击自动进二级引导上传

This commit is contained in:
Aisland
2026-09-01 21:41:42 +08:00
parent a215b2db82
commit 0b5e1c7e86
2 changed files with 15 additions and 5 deletions
+10 -2
View File
@@ -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" }),