feat: group sessions by project on landing page
- Add loadSessionsAndProjects() to fetch sessions and projects in parallel - Store projects in window.projectsMap for quick lookup - Group sessions by projectId, separating assigned and unassigned - Render collapsible project sections with icon, name, and session count - Add toggleProjectSection() to collapse/expand sections (▼/▶) - Display project badges on sessions when assigned to a project - Unassigned sessions shown in separate section at bottom Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -473,3 +473,138 @@ body.sessions-page {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Project Section Styles
|
||||
*/
|
||||
.project-section {
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
|
||||
.project-section:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Project Section Header */
|
||||
.project-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
background: #151515;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.project-section-header:hover {
|
||||
background: #1a1a1a;
|
||||
}
|
||||
|
||||
.project-section-toggle {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
transition: transform 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.project-section-icon {
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.project-section-name {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #e0e0e0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.project-section-count {
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
font-weight: 500;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Project Section Sessions Container */
|
||||
.project-section-sessions {
|
||||
display: block;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.project-section.collapsed .project-section-sessions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Session Rows within Project Sections */
|
||||
.session-row {
|
||||
border-bottom: 1px solid #252525;
|
||||
transition: background 0.2s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.session-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.session-row:hover {
|
||||
background: #252525;
|
||||
}
|
||||
|
||||
/* Session Project Badge */
|
||||
.session-project-badge {
|
||||
display: inline-block;
|
||||
margin-top: 4px;
|
||||
padding: 3px 8px;
|
||||
background: rgba(74, 158, 255, 0.15);
|
||||
color: #4a9eff;
|
||||
border-radius: 4px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
/* Unassigned Section Special Styling */
|
||||
.unassigned-section .project-section-header {
|
||||
background: #1a1a1a;
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
.unassigned-section .project-section-header:hover {
|
||||
background: #222;
|
||||
}
|
||||
|
||||
/* Collapsed state */
|
||||
.project-section.collapsed .project-section-toggle {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
/* Responsive Design for Project Sections */
|
||||
@media (max-width: 768px) {
|
||||
.project-section-header {
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.project-section-toggle {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.project-section-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.project-section-name {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.project-section-count {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.session-project-badge {
|
||||
font-size: 10px;
|
||||
padding: 2px 6px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user