feat: 移动端侧边栏体验 — 窄视口(<1024px)双工作台合并为单面板抽屉(可拖分隔条、高度与底部面板互通)、不提供底部面板按钮、文件/外链打开自动展开、新会话默认收起
This commit is contained in:
@@ -264,6 +264,38 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* The narrow-viewport workbench (MobileWorkbench): BOTH workbench trees
|
||||
stacked in the one drawer — the right panel's tree flexes after the
|
||||
fixed-height bottom tree, with a draggable divider (the .dividerCol
|
||||
hit-strip + hairline) between them. */
|
||||
.mobileWorkbench {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mobilePane {
|
||||
position: relative;
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* The bottom tree of the merged layout: fixed height (state.bottomHeight),
|
||||
flex: none so the top tree takes the remainder. */
|
||||
.mobilePaneBottom {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* The divider of the merged layout sits between the two panes; .dividerCol
|
||||
already supplies the 7px hit strip, row-resize cursor and hairline. */
|
||||
.mobileWorkbench > .dividerCol {
|
||||
flex: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.split {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
@@ -1864,3 +1896,28 @@
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Narrow (mobile) viewport ──────────────────────────────────────────── */
|
||||
|
||||
/* Pairs with NARROW_MAX_WIDTH = 1024 in src/client/breakpoints.ts: widths
|
||||
strictly below 1024px (i.e. max-width: 1023px) switch the sidebar to the
|
||||
mobile layout — one drawer holding both workbenches, one toggle button.
|
||||
The structural switches (which panels render, the merged MobileWorkbench)
|
||||
are JS-driven via useNarrowViewport; this block only adapts the pure
|
||||
style details. */
|
||||
@media (max-width: 1023px) {
|
||||
/* The toggle cluster holds a single button on narrow viewports (the
|
||||
bottom panel button is not rendered), so the open panel's tab strip
|
||||
reserves 40px instead of the desktop 72px — the tabs and + menu still
|
||||
yield space to the one remaining control. */
|
||||
.panel:not(.panelHidden) .tabBar {
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
/* Narrower tabs: a phone-width drawer fits more open tabs before the
|
||||
strip scrolls. */
|
||||
.tab {
|
||||
min-width: 48px;
|
||||
max-width: 128px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user