fix(ui): 左栏图标轨展开/折叠同元素沉底 + 折叠箭头移右边线垂直居中

- SessionRail: 图标轨恒显(展开态靠左 14px 边距,折叠态居中),margin-top:auto 沉底
  ——展开/折叠切换时图标 Y 位置一致
- SessionPanel: 移除 S4 文字「设置」按钮(图标轨已覆盖展开态入口)
- base.css: side-handle-btn 从左下角移到左栏右边线垂直居中(展开 left:260px,
  折叠 left:64px,过渡动画),图标方向由 AppShell 状态切换(收起→右/展开→左)
- inner flex:1 明确高度链,图标轨在内容滚动时始终可见

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jerry
2026-09-02 21:58:55 +08:00
co-authored by Claude Fable 5
parent bbd5db2315
commit c402407a1c
3 changed files with 15 additions and 33 deletions
@@ -139,14 +139,6 @@ const doDelete = async () => {
</template>
</div>
<!-- 展开态设置入口(S4):折叠态齿轮在 SessionRail,展开态在此 -->
<button class="panel-settings-btn" type="button" :title="T.settingsTitle" @click="$emit('goto-settings')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="3" />
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />
</svg>
{{ T.settingsTitle }}
</button>
</div>
<!-- 折叠后的图标轨(FR-SHELL-004 的 B2 侧内容) -->
@@ -196,22 +188,6 @@ const doDelete = async () => {
flex-direction: column;
gap: 10px;
}
.panel-settings-btn {
display: flex;
align-items: center;
gap: 8px;
width: calc(100% - 32px);
margin: 0 16px 12px;
padding: 8px 12px;
border: 1px solid var(--pa-border, #e5e7eb);
border-radius: var(--pa-r-pill, 8px);
background: transparent;
color: var(--pa-text, #111827);
font-size: 13px;
cursor: pointer;
}
.panel-settings-btn svg { width: 16px; height: 16px; flex: none; }
.panel-settings-btn:hover { background: var(--pa-surface-2, #f3f4f6); }
.new-task-btn {
display: flex;
+4 -2
View File
@@ -37,9 +37,11 @@ const emit = defineEmits(['open', 'goto-kg', 'goto-settings']);
.collapsed-rail {
display: flex;
flex-direction: column;
align-items: center;
align-items: flex-start; /* 展开态:图标靠左(原样图标,14px 对齐内容边距) */
gap: 14px;
padding-top: 14px;
width: 100%;
padding: 0 0 14px 14px;
margin-top: auto; /* 沉底:与折叠态同一元素,切换时 Y 高度不变 */
}
.rail-item {
display: inline-flex;
+11 -7
View File
@@ -171,12 +171,12 @@ html.drawer-open { overflow: hidden; }
min-width: 0; overflow: hidden;
transition: all .3s var(--pa-ease-out);
}
.session-panel .inner { display: flex; flex-direction: column; min-height: 0; width: 260px; transition: opacity .2s var(--pa-ease); }
.session-panel .inner { display: flex; flex-direction: column; min-height: 0; width: 260px; flex: 1; transition: opacity .2s var(--pa-ease); }
.side-collapsed .session-panel .inner { opacity: 0; pointer-events: none; }
.session-panel .collapsed-rail {
display: none; flex-direction: column; align-items: center; gap: 14px; padding-top: 14px;
.side-collapsed .session-panel .collapsed-rail {
align-items: center; /* 折叠态:64px 轨内居中,图标原样 */
padding: 0 0 14px; /* 折叠态:去掉展开态的左 14px(底 14px 两态一致) */
}
.side-collapsed .session-panel .collapsed-rail { display: flex; }
.rail-item {
display: inline-flex; align-items: center; justify-content: center;
width: 34px; height: 34px; border-radius: var(--pa-r-md);
@@ -694,16 +694,20 @@ html.drawer-open { overflow: hidden; }
/* ---------- 折叠把手(UI_SPEC §3,FR-SHELL-004) ---------- */
.side-handle-btn {
position: absolute; left: 0; bottom: 40px; z-index: 7;
/* 位于左栏右边线、侧栏区域(顶栏与底栏之间)垂直居中;跨线半嵌 */
position: absolute; left: 260px; z-index: 7;
top: calc(var(--topbar-h) + (100% - var(--topbar-h) - var(--statusbar-h)) / 2);
transform: translate(-50%, -50%);
width: 26px; height: 26px;
border: 1px solid var(--pa-hairline);
background: var(--pa-surface-1);
border-radius: var(--pa-r-md);
display: inline-flex; align-items: center; justify-content: center;
color: var(--pa-ink-muted);
transition: left .3s var(--pa-ease-out), background .2s var(--pa-ease), color .2s var(--pa-ease);
}
.side-handle-btn svg { width: 13px; height: 13px; transition: transform .3s var(--pa-ease-out); }
.side-handle-btn.collapsed svg { transform: rotate(180deg); }
.side-handle-btn svg { width: 13px; height: 13px; }
.app-shell.side-collapsed .side-handle-btn { left: 64px; }
/* ---------- 通用抽屉(UI_SPEC §5 / §7:drawer / drawer-scrim) ---------- */
.drawer-scrim {