重构客户端菜单与设置入口

This commit is contained in:
baiyanyun
2026-07-14 16:38:29 +08:00
parent c3d6c6dc8e
commit 5b14b3f48d
11 changed files with 616 additions and 336 deletions

View File

@@ -7,15 +7,29 @@
background: #f1f2ef;
border-right: 1px solid #deded9;
color: #1f211f;
overflow: hidden;
transition:
width 0.18s ease,
min-width 0.18s ease;
}
.sidebarCollapsed {
width: 64px;
min-width: 64px;
}
.brand {
height: 104px;
height: 84px;
display: grid;
grid-template-columns: 38px 1fr 34px;
align-items: center;
gap: 10px;
padding: 12px 12px 14px 20px;
padding: 6px 12px 10px 20px;
}
.brandWithoutToggle {
grid-template-columns: 38px 1fr;
padding-right: 20px;
}
.brandLogo {
@@ -100,9 +114,10 @@
color: #d48806;
}
.historyTrigger {
.sidebarToggle {
width: 30px;
height: 30px;
flex: none;
border: 0;
border-radius: 8px;
display: inline-flex;
@@ -116,7 +131,7 @@
color 0.16s ease;
}
.historyTrigger:hover {
.sidebarToggle:hover {
background: #dadad4;
color: #252622;
}
@@ -320,52 +335,94 @@
color: #c8342e;
}
.historyPopover :global(.ant-popover-inner) {
padding: 8px;
border-radius: 10px;
box-shadow: 0 12px 28px rgba(22, 24, 26, 0.12);
.sidebarCollapsed .brand {
height: 84px;
display: flex;
flex-direction: column;
justify-content: center;
gap: 8px;
padding: 6px 0;
}
.historyPopover :global(.ant-popover-arrow) {
.sidebarCollapsed .brandLogo {
width: 32px;
height: 32px;
border-radius: 7px;
}
.sidebarCollapsed .brandText,
.sidebarCollapsed .sectionTitle,
.sidebarCollapsed .navLabel,
.sidebarCollapsed .navBadge,
.sidebarCollapsed .userMeta,
.sidebarCollapsed .logoutLabel {
display: none;
}
.historyMenu {
width: 176px;
.sidebarCollapsed .nav {
padding: 0 10px 16px;
overflow-x: hidden;
}
.historyTitle {
padding: 4px 8px 8px;
color: #8e8b84;
font-size: 12px;
font-weight: 600;
.sidebarCollapsed .navSection {
padding-bottom: 8px;
margin-bottom: 8px;
}
.historyItem {
width: 100%;
height: 32px;
border: 0;
border-radius: 7px;
display: flex;
align-items: center;
gap: 8px;
padding: 0 8px;
background: transparent;
color: #4e4e49;
font: inherit;
font-size: 13px;
text-align: left;
cursor: pointer;
}
.historyItem:hover {
background: #f4f4f1;
color: #d66c47;
}
.historyIcon {
width: 16px;
display: inline-flex;
align-items: center;
.sidebarCollapsed .navItem {
width: 42px;
padding: 0;
justify-content: center;
gap: 0;
}
.sidebarCollapsed .navItemActive::after {
right: 3px;
}
.sidebarCollapsed .footer {
display: flex;
flex-direction: column;
align-items: center;
padding: 10px 0 12px;
}
.sidebarCollapsed .userCard {
position: relative;
width: 36px;
height: 36px;
justify-content: center;
gap: 0;
padding: 0;
border: 0;
background: transparent;
}
.sidebarCollapsed .avatar {
width: 32px;
height: 32px;
}
.sidebarCollapsed .onlineDot {
position: absolute;
right: 0;
bottom: 0;
width: 8px;
height: 8px;
border: 2px solid #f1f2ef;
}
.sidebarCollapsed .logoutButton {
width: 36px;
height: 36px;
margin-top: 8px;
padding: 0;
justify-content: center;
gap: 0;
background: transparent;
font-size: 15px;
}
.sidebarCollapsed .logoutButton:hover {
background: #f1e3df;
}