feat: 支持登录隐藏壳层和路由跳转参数

This commit is contained in:
fengxiangdebaozi committed 2026-07-23 11:16:11 +08:00
1 parent 359bd28f2c
commit 0634337858
6 files changed
+40 -13

No files matched your search

+17 -7
View File
@@ -118,6 +118,7 @@ export function WorkspaceLayout({
pageSidebarHidden = false,
workspaceSidebarHidden = false,
headerHidden = false,
compactActionsHidden = false,
compactWorkspaceSidebar = false,
defaultHistorySidebarOpen,
wrapperOverflowHidden = false,
@@ -130,6 +131,7 @@ export function WorkspaceLayout({
pageSidebarHidden?: boolean;
workspaceSidebarHidden?: boolean;
headerHidden?: boolean;
compactActionsHidden?: boolean;
compactWorkspaceSidebar?: boolean;
/** 全量模式下通用问答等页:聊天记录侧栏默认展开;未指定时紧凑模式仍默认收起。 */
defaultHistorySidebarOpen?: boolean;
@@ -144,7 +146,7 @@ export function WorkspaceLayout({
const pathname = useLocation().pathname;
const isGeneralQa = pathname.startsWith('/page/workspace/chats');
const showCompactTopActions =
headerHidden && shouldShowCompactTopActions(pathname);
headerHidden && !compactActionsHidden && shouldShowCompactTopActions(pathname);
const pageSidebarWidth = pageSidebarHidden
? '0rem'
@@ -236,8 +238,10 @@ function NewChatEntryRoute({
layoutProps: {
pageSidebarCollapsed: boolean;
pageSidebarHidden: boolean;
workspaceSidebarHidden: boolean;
headerHidden: boolean;
compactWorkspaceSidebar: boolean;
compactActionsHidden: boolean;
pageSidebarDark: boolean;
forceWorkspaceSidebarCollapsed: boolean;
};
@@ -258,14 +262,18 @@ function NewChatEntryRoute({
export default function WorkspaceRoutes({
pageSidebarCollapsed = false,
pageSidebarHidden = false,
workspaceSidebarHidden = false,
headerHidden = false,
compactActionsHidden = false,
compactWorkspaceSidebar = false,
pageSidebarDark = false,
forceWorkspaceSidebarCollapsed = false,
}: {
pageSidebarCollapsed?: boolean;
pageSidebarHidden?: boolean;
workspaceSidebarHidden?: boolean;
headerHidden?: boolean;
compactActionsHidden?: boolean;
compactWorkspaceSidebar?: boolean;
pageSidebarDark?: boolean;
forceWorkspaceSidebarCollapsed?: boolean;
@@ -273,7 +281,9 @@ export default function WorkspaceRoutes({
const layoutProps = {
pageSidebarCollapsed,
pageSidebarHidden,
workspaceSidebarHidden,
headerHidden,
compactActionsHidden,
compactWorkspaceSidebar,
pageSidebarDark,
forceWorkspaceSidebarCollapsed,
@@ -287,7 +297,7 @@ export default function WorkspaceRoutes({
path="chats"
element={
<WorkspaceLayout {...layoutProps}>
<ChatsPage compactChrome={headerHidden} />
<ChatsPage compactChrome={headerHidden && !compactActionsHidden} />
</WorkspaceLayout>
}
/>
@@ -373,7 +383,7 @@ export default function WorkspaceRoutes({
<AgentChatPage
showAgentList
compactAppearanceActions={
headerHidden ? <CompactAppearanceActions /> : undefined
headerHidden && !compactActionsHidden ? <CompactAppearanceActions /> : undefined
}
/>
</ChatRuntime>
@@ -410,7 +420,7 @@ export default function WorkspaceRoutes({
<WorkspaceLayout {...layoutProps}>
<AIWritingPage
hideAdvancedFields
compactChrome={headerHidden}
compactChrome={headerHidden && !compactActionsHidden}
/>
</WorkspaceLayout>
}
@@ -444,7 +454,7 @@ export default function WorkspaceRoutes({
element={
<WorkspaceLayout {...layoutProps}>
<ChatRuntime>
<RoundtablePlanningPage compactChrome={headerHidden} />
<RoundtablePlanningPage compactChrome={headerHidden && !compactActionsHidden} />
</ChatRuntime>
</WorkspaceLayout>
}
@@ -454,7 +464,7 @@ export default function WorkspaceRoutes({
element={
<WorkspaceLayout {...layoutProps}>
<ChatRuntime>
<PositionRoundtablePage compactChrome={headerHidden} />
<PositionRoundtablePage compactChrome={headerHidden && !compactActionsHidden} />
</ChatRuntime>
</WorkspaceLayout>
}
@@ -516,7 +526,7 @@ export default function WorkspaceRoutes({
path="scheduled/tasks"
element={
<WorkspaceLayout {...layoutProps}>
<ScheduledTasksPage compactChrome={headerHidden} />
<ScheduledTasksPage compactChrome={headerHidden && !compactActionsHidden} />
</WorkspaceLayout>
}
/>