feat: group sidebar sessions by project

This commit is contained in:
shiyue
2026-04-24 15:22:31 +08:00
parent 2e2dc21047
commit a6f3ab0485
3 changed files with 198 additions and 44 deletions

View File

@@ -164,6 +164,17 @@ html[data-theme='coolvibe'] .attachment-tray-note {
border-color: rgba(191, 220, 228, 0.96);
}
html[data-theme='coolvibe'] .session-project-header {
background: linear-gradient(180deg, rgba(247, 251, 252, 0.94), rgba(239, 248, 250, 0.88));
color: #5f7f87;
border-bottom: 1px solid rgba(191, 220, 228, 0.56);
}
html[data-theme='coolvibe'] .session-project-count {
background: rgba(8, 145, 178, 0.1);
color: #0a6d83;
}
html[data-theme='coolvibe'] .session-item {
border: 1px solid transparent;
border-radius: 14px;
@@ -290,6 +301,17 @@ html[data-theme='coolvibe'] .theme-card.active {
box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.14);
}
html[data-theme='editorial'] .session-project-header {
background: linear-gradient(180deg, rgba(239, 232, 220, 0.94), rgba(246, 241, 232, 0.84));
color: #7f6f61;
border-bottom: 1px solid rgba(139, 94, 60, 0.12);
}
html[data-theme='editorial'] .session-project-count {
background: rgba(139, 94, 60, 0.1);
color: #71482d;
}
html[data-theme='editorial'] {
--bg-primary: #f6f1e8;
--bg-secondary: #efe8dc;
@@ -621,6 +643,46 @@ body.session-loading-active {
line-height: 1.6;
background: rgba(255, 249, 242, 0.7);
}
.session-project-group {
margin: 0 0 12px;
}
.session-project-header {
position: sticky;
top: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin: 4px 2px 5px;
padding: 6px 8px 5px;
background: rgba(242, 235, 226, 0.92);
backdrop-filter: blur(8px);
color: var(--text-muted);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.session-project-name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.session-project-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 22px;
height: 18px;
padding: 0 7px;
border-radius: 999px;
background: var(--bg-tertiary);
color: var(--text-secondary);
font-size: 10px;
letter-spacing: 0;
}
.session-item {
display: flex;
align-items: center;