This commit is contained in:
fengxiangdebaozi committed 2026-06-23 19:47:54 +08:00
commit 0fedb6ffd8
2 files changed
+11 -2

No files matched your search

+8 -1
View File
@@ -44,8 +44,15 @@ function PageLayout() {
() => isEmbedActive() || readEmbedParam(location.search) === "on",
[location.pathname, location.search],
);
// 「大屏绘制」独立页(/page/strategy/dashboard-agent)本就是「带导航栏 + 侧边栏」的独立页,
// 但它常被深链「上一步」从去 chrome 的工作区/新标签打开——那里 chromeByPreference 可能为 false
// (界面模式非全量、或会话级 sidebar 未置位),导致整页没有顶栏/侧栏。故对该路由**强制全局 chrome**
// (仍尊重 embed=1 嵌入态:外部 iframe 套用时仍隐藏)。
const forceChromeForDashboardAgent = location.pathname.includes("/strategy/dashboard-agent");
const pageSidebarAllowed =
chromeByPreference && !isChatsIframeWorkspacePath(location.pathname) && !embedActive;
(forceChromeForDashboardAgent || chromeByPreference) &&
!isChatsIframeWorkspacePath(location.pathname) &&
!embedActive;
// h-full(100%)而非 h-screen(100vh):配合 globals.css 的 html/body/#root height:100%
// 高度链,根布局跟随容器高度。全屏下 100% 解析到视口,与 h-screen 等价;无界等嵌套