diff --git a/01_content/lib/client.js b/01_content/lib/client.js index 2ad6b23..15c1bba 100644 --- a/01_content/lib/client.js +++ b/01_content/lib/client.js @@ -8162,10 +8162,11 @@ var css = xterm_default + "\n" + [ ".dsh-wt_consoleThemeBtnOn{background:var(--wt-chip);color:var(--wt-text);opacity:1}", ".dsh-wt_consoleGrid{display:flex;flex-wrap:wrap;justify-content:center;gap:64px;align-content:start;margin-top:clamp(32px,9vh,110px);width:100%;max-width:calc(var(--wt-cols,3)*242px + (var(--wt-cols,3) - 1)*64px);margin-left:auto;margin-right:auto}", ".dsh-wt_consoleCols{display:inline-flex;align-items:center;gap:8px;padding:2px 8px;border:1px solid var(--wt-border);border-radius:999px;background:var(--wt-card);color:var(--wt-text3);font-size:11px}", - ".dsh-wt_consoleColsDots{display:inline-flex;align-items:center;gap:6px}", - ".dsh-wt_consoleColsDot{width:11px;height:11px;border-radius:50%;border:1px solid var(--wt-borderHover);background:transparent;cursor:pointer;padding:0;transition:background .15s ease,border-color .15s ease,transform .15s ease}", - ".dsh-wt_consoleColsDot:hover{transform:scale(1.25);border-color:var(--dsw-alias-state-accent-primary,#4f8ef7)}", - ".dsh-wt_consoleColsDotOn{background:var(--dsw-alias-state-accent-primary,#4f8ef7);border-color:var(--dsw-alias-state-accent-primary,#4f8ef7)}", + ".dsh-wt_consoleBar{position:relative;width:128px;height:20px;border-radius:999px;background:rgba(255,255,255,.08);cursor:pointer;flex:none}", + ".dsh-wt_consoleBarFill{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:linear-gradient(90deg,#3b82f6,#4f8ef7);transition:width .3s cubic-bezier(.22,.61,.36,1);pointer-events:none}", + ".dsh-wt_consoleBarDot{position:absolute;top:50%;transform:translate(-50%,-50%);width:5px;height:5px;border-radius:50%;background:rgba(255,255,255,.35);border:none;padding:0;cursor:pointer;z-index:2}", + ".dsh-wt_consoleBarDot:hover{background:rgba(255,255,255,.65)}", + ".dsh-wt_consoleBarKnob{position:absolute;top:50%;transform:translate(-50%,-50%);width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.4);transition:left .3s cubic-bezier(.22,.61,.36,1);z-index:3;pointer-events:none}", ".dsh-wt_consoleCard{position:relative;box-sizing:border-box;flex:none;width:calc((100% - (var(--wt-cols,3) - 1)*64px)/var(--wt-cols,3));display:flex;flex-direction:column;gap:14px;aspect-ratio:1/1;min-height:192px;padding:21px;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,rgba(255,255,255,.07) 30%,rgba(255,255,255,.01) 60%,rgba(0,0,0,.07) 100%),rgba(18,23,32,.24);border:1px solid transparent;border-radius:16px;box-shadow:0 10px 28px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.13);cursor:pointer;transition:transform .14s ease,box-shadow .14s ease;overflow:hidden}", // 玻璃边缘:四角黑白渐变描边(左上/右下=白,右上/左下=黑),1px 环挖空实现 '.dsh-wt_consoleCard::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:conic-gradient(from 45deg,rgba(0,0,0,.4) 0deg,rgba(255,255,255,.55) 90deg,rgba(0,0,0,.4) 180deg,rgba(255,255,255,.55) 270deg,rgba(0,0,0,.4) 360deg);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;pointer-events:none;opacity:.5}', @@ -17324,7 +17325,19 @@ function ConsolePane() { )) }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-wt_consoleCols", role: "group", "aria-label": T("console.colsLabel"), children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: T("console.cols") }), - /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-wt_consoleColsDots", children: [1, 2, 3, 4, 5].map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-wt_consoleColsDot" + (v <= cols ? " dsh-wt_consoleColsDotOn" : ""), "aria-label": String(v), title: String(v), onClick: () => onCols(v) }, v)) }) + /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-wt_consoleBar", onClick: (e) => { + const r = e.currentTarget.getBoundingClientRect(); + const t = (e.clientX - r.left) / r.width; + const v = Math.round(t * 4) + 1; + onCols(Math.max(1, Math.min(5, v))); + }, children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-wt_consoleBarFill", style: { width: (cols - 1) / 4 * 100 + "%" } }), + [1, 2, 3, 4, 5].map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dsh-wt_consoleBarDot", style: { left: (v - 1) / 4 * 100 + "%" }, "aria-label": String(v), title: String(v), onClick: (e) => { + e.stopPropagation(); + onCols(v); + } }, v)), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-wt_consoleBarKnob", style: { left: (cols - 1) / 4 * 100 + "%" } }) + ] }) ] }) ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: gridRef, className: "dsh-wt_consoleGrid", style: { ["--wt-cols"]: cols }, children: [ diff --git a/01_content/src/client/split.tsx b/01_content/src/client/split.tsx index 1e71948..d34dfd2 100644 --- a/01_content/src/client/split.tsx +++ b/01_content/src/client/split.tsx @@ -1124,11 +1124,18 @@ function ConsolePane() {