fix(ui): 宽屏面板统一由 shell.overlay 渲染,不再依赖视图探测 (v0.5.3-local.14)
local.13 用 bt-leftcol 等选择器探测 DS Bot 视图,实测未命中,overlay 实例仍不渲染 (DS Bot 页 dsh-wt_edgeStrip 仍为 0)。改为不依赖探测: - 宽屏面板只由 overlay 实例渲染(sidebar 实例只在窄屏渲染 rail) - overlay 实例补 pointer-events:auto,避免 overlay 容器拦截点击 - findSidebar 增加全局兜底(overlay 里向上找不到侧栏时取第一个可见左栏), 保证细条贴在正确左缘 取舍:sidebar.worktable.project 的宿主项目条目在宽屏下不再渲染(跨座位不可见)。 验证:npm run pack 全绿(edge-panel 6 组 + sidebar-popup 全过),双资产同源 c28cba75…。
This commit is contained in:
+13
-23
@@ -8432,10 +8432,10 @@ var css = xterm_default + "\n" + [
|
||||
".dsh-wt_manageRowSub{margin-left:20px}",
|
||||
// 停靠态:左缘细条 + 滑出面板
|
||||
".dsh-wt_edgeAnchor{width:0;height:0;overflow:hidden;flex:none}",
|
||||
".dsh-wt_edgeStrip{position:fixed;top:0;bottom:0;width:12px;z-index:2147483000;display:flex;align-items:center;justify-content:center;cursor:pointer;background:var(--dsw-alias-fill-l1,rgba(125,125,125,.14));border-right:1px solid var(--dsw-alias-border-l1,rgba(125,125,125,.18));transition:background .15s,border-color .15s}",
|
||||
".dsh-wt_edgeStrip{position:fixed;top:0;bottom:0;width:12px;z-index:2147483000;pointer-events:auto;display:flex;align-items:center;justify-content:center;cursor:pointer;background:var(--dsw-alias-fill-l1,rgba(125,125,125,.14));border-right:1px solid var(--dsw-alias-border-l1,rgba(125,125,125,.18));transition:background .15s,border-color .15s}",
|
||||
".dsh-wt_edgeStrip:hover,.dsh-wt_edgeStripOn{background:var(--dsw-alias-fill-l1,rgba(255,255,255,.05));border-right-color:var(--dsw-alias-border-l1,#262b36)}",
|
||||
".dsh-wt_edgeStripGlyph{font-size:11px;line-height:1;color:var(--dsw-alias-label-tertiary,#6e7683);user-select:none;-webkit-user-select:none}",
|
||||
".dsh-wt_edgePanelWrap{position:fixed;top:0;bottom:0;width:250px;z-index:2147483001;transform:translateX(-100%);transition:transform .18s ease;box-shadow:14px 0 30px rgba(0,0,0,.18)}",
|
||||
".dsh-wt_edgePanelWrap{position:fixed;top:0;bottom:0;width:250px;z-index:2147483001;pointer-events:auto;transform:translateX(-100%);transition:transform .18s ease;box-shadow:14px 0 30px rgba(0,0,0,.18)}",
|
||||
".dsh-wt_edgePanelWrapOn{transform:translateX(0)}",
|
||||
".dsh-wt_edgePanel{position:absolute;inset:0;box-sizing:border-box;padding:10px 10px 14px;background:var(--dsw-alias-bg-base,#0b0e14);border-right:1px solid var(--dsw-alias-border-l2,#3a4150);overflow-y:auto;overscroll-behavior:contain}",
|
||||
".dsh-wt_edgeHandle{position:absolute;right:0;top:50%;transform:translateY(-50%);width:17px;height:64px;display:flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--dsw-alias-border-l2,#3a4150);border-right:none;border-radius:8px 0 0 8px;background:var(--dsw-alias-fill-l1,rgba(125,125,125,.10));color:var(--dsw-alias-state-accent-primary,#4f8ef7);font-size:13px;line-height:1;cursor:pointer;box-shadow:-4px 0 10px rgba(0,0,0,.14)}",
|
||||
@@ -9233,7 +9233,7 @@ var CHANGELOG_V030 = `\u66F4\u65B0\u516C\u544A \xB7 v0.5.1
|
||||
\u30103.1 \u6587\u5B57\u4E0E\u7EC6\u8282\u6253\u78E8\u3011\u5168\u5C40\u5B57\u4F53\u4E0E\u5B57\u53F7\u7EDF\u4E00\u4F18\u5316\u3001\u4E0B\u62C9\u9762\u677F\u73BB\u7483\u5316\u4E0E\u5BF9\u9F50\u3001\u83DC\u5355\u70B9\u9009\u540E\u4FDD\u6301\u6253\u5F00\u4FBF\u4E8E\u8FDE\u7EED\u9884\u89C8\u3001\u6309\u94AE\u63CF\u8FB9\u4E0E\u60AC\u505C\u53CD\u9988\u7B49\u4EA4\u4E92\u7EC6\u8282\uFF1B\u540C\u65F6\u4FEE\u590D\u4E86\u591A\u9879\u4F53\u9A8C\u95EE\u9898\uFF08\u7167\u7247\u4E0A\u4F20\u6E05\u6670\u5EA6\u3001\u80CC\u666F\u7F51\u683C\u7EBF\u5728\u7167\u7247\u6A21\u5F0F\u4E0B\u4E0D\u751F\u6548\u3001\u6D45\u8272\u4E3B\u9898\u4E0B\u5DE5\u4F5C\u72B6\u6001\u5149\u6548\u4E0D\u53EF\u89C1\u7B49\uFF09\u3002`;
|
||||
|
||||
// src/client/updateCheck.ts
|
||||
var LOCAL_VERSION = false ? "dev" : "0.5.3-local.13";
|
||||
var LOCAL_VERSION = false ? "dev" : "0.5.3-local.14";
|
||||
var UPDATE_API = "/api/worktable/update-check";
|
||||
var K_UPDATE_CHECK = "dsh.worktable.updateCheck.v1";
|
||||
var K_LAST_CHECK = "dsh.worktable.lastUpdateCheck.v1";
|
||||
@@ -21216,6 +21216,15 @@ function findSidebar(start) {
|
||||
if (typeof el.className === "string" && /SidebarRoot|sidebar/i.test(el.className)) return el;
|
||||
el = el.parentElement;
|
||||
}
|
||||
try {
|
||||
const candidates = document.querySelectorAll('aside, nav, [class*="SidebarRoot"], [class*="sidebar"]');
|
||||
for (let i = 0; i < candidates.length; i++) {
|
||||
const node = candidates[i];
|
||||
const r = node.getBoundingClientRect();
|
||||
if (r.width > 40 && r.height > 100 && r.left < (typeof window !== "undefined" ? window.innerWidth : 1280) / 2) return node;
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var registryStore = { ids: [], listeners: /* @__PURE__ */ new Set() };
|
||||
@@ -21803,27 +21812,8 @@ function RenameInput(props) {
|
||||
}
|
||||
);
|
||||
}
|
||||
function useDsBotView() {
|
||||
const probe = () => {
|
||||
try {
|
||||
return !!document.querySelector('[class*="bt-leftcol"], .bt-home-nav, [class*="bt-home"]');
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const [active, setActive] = (0, import_react3.useState)(probe);
|
||||
(0, import_react3.useEffect)(() => {
|
||||
const id = window.setInterval(() => {
|
||||
const next = probe();
|
||||
setActive((prev) => prev === next ? prev : next);
|
||||
}, 800);
|
||||
return () => window.clearInterval(id);
|
||||
}, []);
|
||||
return active;
|
||||
}
|
||||
function WorktableSection(props) {
|
||||
const slotRole = props.slotRole === "overlay" ? "overlay" : "sidebar";
|
||||
const dsBotView = useDsBotView();
|
||||
const wide = props.wide !== false;
|
||||
const renderProjectSlot = slotRole === "sidebar" && typeof props.renderSlot === "function" ? props.renderSlot : null;
|
||||
const t = (key, params) => {
|
||||
@@ -24085,7 +24075,7 @@ function WorktableSection(props) {
|
||||
popupLayer
|
||||
] });
|
||||
}
|
||||
if (slotRole === "overlay" ? !dsBotView : dsBotView) return null;
|
||||
if (slotRole === "overlay" ? !wide : wide) return null;
|
||||
const content = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsh-wt_header", children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
||||
|
||||
@@ -382,7 +382,7 @@ function resolveDshHomeSafe() {
|
||||
cachedDshHome = baseDshHome();
|
||||
return cachedDshHome;
|
||||
}
|
||||
var PLUGIN_VERSION = false ? "dev" : "0.5.3-local.13";
|
||||
var PLUGIN_VERSION = false ? "dev" : "0.5.3-local.14";
|
||||
var name = "dsh-worktable";
|
||||
var inject = ["webServer", "sessions"];
|
||||
var HEALTH_PATH = "/api/worktable/health";
|
||||
|
||||
Reference in New Issue
Block a user