feat(ui): let users pin the sidebar

Restore a persistent expanded-sidebar choice while preserving the compact hover rail as the default.
This commit is contained in:
PathGao
2026-07-30 14:39:55 +08:00
parent c377dca27c
commit 5373786faa
16 changed files with 153 additions and 14 deletions
+33
View File
@@ -230,6 +230,39 @@
padding: 8px 8px 12px;
}
.sidebar-pin {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
height: 34px;
padding: 0 16px;
border: none;
border-radius: 6px;
background: transparent;
color: var(--ant-color-text-secondary);
cursor: pointer;
font-size: 13px;
text-align: left;
transition: background-color 0.2s, color 0.2s;
}
.sidebar-pin:hover,
.sidebar-pin:focus-visible {
background-color: color-mix(in srgb, var(--ant-color-primary) 10%, transparent);
color: var(--ant-color-primary);
outline: none;
}
.sidebar-pin .anticon {
font-size: 16px;
}
.ant-layout-sider-collapsed .sidebar-pin {
justify-content: center;
padding: 0;
}
.sider-version {
display: flex;
align-items: center;