Add collapsible card sections with name filtering

Introduces CardSection class that wraps each card grid with a collapsible
header and inline filter input. Collapse state persists in localStorage,
filter value survives auto-refresh re-renders. When filter is active the
add-card button is hidden. Applied to all 13 sections across Targets,
Sources, and Profiles tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 00:46:14 +03:00
parent 808037775f
commit 166ec351b1
7 changed files with 246 additions and 118 deletions

View File

@@ -603,6 +603,61 @@
border-bottom: 1px solid var(--border-color);
}
/* ── Collapsible card sections (cs-*) ── */
.cs-header {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
}
.cs-chevron {
font-size: 0.65rem;
color: var(--text-secondary);
width: 12px;
display: inline-block;
flex-shrink: 0;
}
.cs-title {
flex-shrink: 0;
}
.cs-count {
background: var(--border-color);
color: var(--text-secondary);
border-radius: 10px;
padding: 0 7px;
font-size: 0.75rem;
font-weight: 600;
flex-shrink: 0;
}
.cs-filter {
margin-left: auto;
width: 160px;
max-width: 40%;
padding: 3px 8px !important;
font-size: 0.78rem !important;
border: 1px solid var(--border-color) !important;
border-radius: 12px !important;
background: var(--bg-color) !important;
color: var(--text-color) !important;
outline: none;
box-shadow: none !important;
}
.cs-filter:focus {
border-color: var(--primary-color) !important;
}
.cs-filter::placeholder {
color: var(--text-secondary);
font-size: 0.75rem;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.templates-grid {