Files
wled-screen-controller-mixed/server/src/wled_controller/static/css/streams.css
alexei.dolgolyov 466527bd4a Add clone buttons, fix card navigation highlight, UI polish
- Add clone buttons to Audio Source and Value Source cards
- Fix command palette navigation destroying card highlight by skipping
  redundant data reload (skipLoad option on switchTab)
- Convert value source modal sliders to value-in-label pattern
- Change audio/value source modal footers to icon-only buttons
- Remove separator lines between card sections
- Add UI conventions to CLAUDE.md (card appearance, modal footer, sliders)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 03:10:36 +03:00

734 lines
14 KiB
CSS

/* ===========================
Capture Templates Styles
=========================== */
.templates-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 20px;
}
.template-card {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 16px;
transition: box-shadow 0.2s;
display: flex;
flex-direction: column;
position: relative;
}
.template-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.add-template-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 180px;
cursor: pointer;
border: 2px dashed var(--border-color);
background: transparent;
transition: border-color 0.2s, background 0.2s;
}
.add-template-card:hover {
border-color: var(--primary-color);
background: rgba(33, 150, 243, 0.05);
box-shadow: none;
}
.add-template-icon {
font-size: 2.5rem;
font-weight: 300;
color: var(--text-secondary);
line-height: 1;
transition: color 0.2s;
}
.add-template-card:hover .add-template-icon {
color: var(--primary-text-color);
}
.add-template-label {
font-size: 0.85rem;
color: var(--text-secondary);
margin-top: 8px;
font-weight: 500;
}
.template-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.template-card .template-card-header {
padding-right: 24px;
}
.template-name {
font-size: 18px;
font-weight: bold;
color: var(--text-color);
}
.badge {
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
}
.template-description {
color: var(--text-secondary);
font-size: 14px;
margin-bottom: 12px;
line-height: 1.4;
}
.template-config {
font-size: 14px;
color: var(--text-secondary);
margin-bottom: 8px;
}
.filter-chain {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 4px;
margin-bottom: 8px;
}
.filter-chain-item {
font-size: 0.7rem;
background: var(--border-color);
color: var(--text-secondary);
padding: 2px 8px;
border-radius: 10px;
}
.filter-chain-arrow {
font-size: 0.7rem;
color: var(--text-muted);
}
.template-config-details {
margin: 12px 0;
font-size: 13px;
}
.template-config-details summary {
cursor: pointer;
color: var(--primary-text-color);
font-weight: 500;
padding: 4px 0;
}
.template-config-details summary:hover {
text-decoration: underline;
}
.template-no-config {
margin: 12px 0;
font-size: 13px;
color: var(--primary-text-color);
font-weight: 500;
padding: 4px 0;
}
.config-table {
width: 100%;
margin-top: 8px;
border-collapse: collapse;
font-size: 13px;
}
.config-table td {
padding: 4px 8px;
border-bottom: 1px solid var(--border-color);
}
.config-table tr:last-child td {
border-bottom: none;
}
.config-key {
color: var(--text-secondary);
white-space: nowrap;
width: 1%;
}
.config-value {
color: var(--text-primary);
font-family: monospace;
}
/* Engine config grid (property name left, input right) */
.config-grid {
display: grid;
grid-template-columns: auto 1fr;
gap: 8px 12px;
align-items: center;
margin-top: 12px;
}
.config-grid-label {
font-size: 0.85rem;
color: var(--text-secondary);
white-space: nowrap;
text-align: right;
}
.config-grid-value input,
.config-grid-value select {
width: 100%;
padding: 6px 10px;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--bg-color);
color: var(--text-color);
font-size: 0.85rem;
}
.template-card-actions {
display: flex;
gap: 8px;
margin-top: auto;
padding-top: 12px;
border-top: 1px solid var(--border-color);
align-items: center;
}
.template-card-actions .btn:not(.btn-icon) {
flex: 1;
}
.template-card-actions .btn-icon {
flex-shrink: 0;
}
.text-muted {
color: var(--text-secondary);
font-style: italic;
font-size: 13px;
}
/* PP Filter List in Template Modal */
.pp-filter-list {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 12px;
}
.pp-filter-empty {
color: var(--text-secondary);
font-size: 13px;
text-align: center;
padding: 16px;
border: 1px dashed var(--border-color);
border-radius: 8px;
}
.pp-filter-card {
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-secondary);
padding: 10px 12px;
}
.pp-filter-card-header {
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
user-select: none;
}
.pp-filter-card.expanded .pp-filter-card-header {
margin-bottom: 8px;
}
.pp-filter-card-chevron {
font-size: 10px;
color: var(--text-secondary);
flex-shrink: 0;
width: 12px;
}
.pp-filter-card-name {
font-weight: 600;
font-size: 14px;
color: var(--text-primary);
}
.pp-filter-card-summary {
color: var(--text-secondary);
font-size: 12px;
margin-right: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.pp-filter-card-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
margin-left: auto;
}
.btn-filter-action {
background: none;
border: 1px solid var(--border-color);
border-radius: 4px;
color: var(--text-secondary);
cursor: pointer;
width: 26px;
height: 26px;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
padding: 0;
}
.btn-filter-action:hover:not(:disabled) {
background: var(--border-color);
color: var(--text-primary);
}
.btn-filter-action:disabled {
opacity: 0.3;
cursor: not-allowed;
}
.btn-filter-remove:hover:not(:disabled) {
background: rgba(239, 68, 68, 0.15);
border-color: rgba(239, 68, 68, 0.4);
color: #ef4444;
}
.pp-filter-card-options {
display: flex;
flex-direction: column;
gap: 4px;
}
.pp-filter-option {
display: flex;
flex-direction: column;
gap: 2px;
}
.pp-filter-option label {
display: flex;
justify-content: space-between;
font-size: 12px;
color: var(--text-secondary);
}
.pp-filter-option input[type="range"] {
width: 100%;
}
.pp-filter-option-bool label {
justify-content: space-between;
gap: 8px;
align-items: center;
cursor: pointer;
padding: 4px 0;
}
.pp-filter-option-bool input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
width: 34px;
min-width: 34px;
height: 18px;
background: var(--border-color);
border-radius: 9px;
position: relative;
cursor: pointer;
transition: background 0.2s;
order: 1;
margin: 0;
}
.pp-filter-option-bool input[type="checkbox"]::after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 14px;
height: 14px;
background: white;
border-radius: 50%;
transition: transform 0.2s;
}
.pp-filter-option-bool input[type="checkbox"]:checked {
background: var(--primary-color);
}
.pp-filter-option-bool input[type="checkbox"]:checked::after {
transform: translateX(16px);
}
.pp-filter-option-bool span {
order: 0;
}
.pp-add-filter-row {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 4px;
}
.pp-add-filter-select {
flex: 1;
padding: 6px 10px;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--card-bg);
color: var(--text-primary);
font-size: 13px;
}
.pp-add-filter-btn {
width: 34px;
height: 34px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--card-bg);
color: var(--text-primary);
font-size: 20px;
cursor: pointer;
padding: 0;
line-height: 1;
}
.pp-add-filter-btn:hover {
background: var(--border-color);
}
/* Template Test Section */
.template-test-section {
background: var(--bg-secondary);
border-radius: 8px;
padding: 16px;
}
.template-test-section h3 {
margin-top: 0;
margin-bottom: 12px;
font-size: 16px;
}
.test-results-container {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 16px;
}
.test-preview-section,
.test-performance-section {
margin-bottom: 20px;
}
.test-preview-section:last-child,
.test-performance-section:last-child {
margin-bottom: 0;
}
.test-preview-section h4,
.test-performance-section h4 {
margin-top: 0;
margin-bottom: 12px;
font-size: 14px;
font-weight: 600;
color: var(--text-secondary);
}
.test-preview-image {
border-radius: 4px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.test-preview-image img {
display: block;
width: 100%;
height: auto;
}
.test-performance-stats {
display: flex;
flex-direction: column;
gap: 8px;
}
.stat-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid var(--border-color);
font-size: 14px;
}
.stat-item:last-child {
border-bottom: none;
}
.stat-item span {
color: var(--text-secondary);
font-weight: 500;
}
.stat-item strong {
color: var(--text-color);
font-weight: 600;
font-family: monospace;
}
/* Empty state */
.empty-state {
text-align: center;
padding: 40px 20px;
color: var(--text-secondary);
font-size: 16px;
}
/* Stream type badges */
.badge-raw {
background: #1976d2;
color: white;
}
.badge-processed {
background: #7b1fa2;
color: white;
}
/* Stream info panel in stream selector modal */
.stream-info-panel {
padding: 4px 0 0 0;
font-size: 14px;
line-height: 1.6;
}
/* Stream sub-tabs */
.stream-tab-bar {
display: flex;
align-items: center;
gap: 4px;
border-bottom: 2px solid var(--border-color);
margin-bottom: 16px;
}
.stream-tab-btn {
background: none;
border: none;
padding: 8px 14px;
font-size: 0.9rem;
font-weight: 500;
color: var(--text-secondary);
cursor: pointer;
border-bottom: 2px solid transparent;
margin-bottom: -2px;
transition: color 0.2s, border-color 0.2s;
}
.stream-tab-btn:hover {
color: var(--text-color);
}
.stream-tab-btn.active {
color: var(--primary-text-color);
border-bottom-color: var(--primary-color);
}
.stream-tab-count {
background: var(--border-color);
color: var(--text-secondary);
font-size: 0.7rem;
font-weight: 600;
padding: 1px 6px;
border-radius: 8px;
margin-left: 4px;
}
.stream-tab-btn.active .stream-tab-count {
background: var(--primary-color);
color: #fff;
}
.cs-expand-collapse-group {
margin-left: auto;
display: flex;
gap: 2px;
}
.btn-expand-collapse {
background: none;
border: 1px solid var(--border-color);
color: var(--text-secondary);
font-size: 0.85rem;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: 4px;
transition: color 0.2s, background 0.2s;
padding: 0;
}
.btn-expand-collapse:hover {
color: var(--text-color);
background: var(--border-color);
}
.stream-tab-panel {
display: none;
}
.stream-tab-panel.active {
display: block;
}
/* Sub-tab content sections */
.subtab-section {
margin-bottom: 24px;
}
.subtab-section:last-child {
margin-bottom: 0;
}
.subtab-section-header {
font-size: 1rem;
font-weight: 600;
color: var(--text-secondary);
margin: 0 0 12px 0;
padding-bottom: 8px;
}
.subtab-section-header.cs-header {
margin-bottom: 0;
padding-bottom: 8px;
}
/* ── Collapsible card sections (cs-*) ── */
.cs-header {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
position: sticky;
top: var(--header-height, 0px);
z-index: 10;
background: var(--bg-color);
padding: 8px 0;
}
.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-wrap {
position: relative;
margin-left: auto;
width: 180px;
max-width: 40%;
flex-shrink: 0;
}
.cs-filter {
width: 100%;
padding: 4px 26px 4px 10px !important;
font-size: 0.78rem !important;
border: 1px solid var(--border-color) !important;
border-radius: 14px !important;
background: var(--bg-secondary) !important;
color: var(--text-color) !important;
outline: none;
box-shadow: none !important;
box-sizing: border-box;
transition: border-color 0.2s, background 0.2s, width 0.2s;
}
.cs-filter:focus {
border-color: var(--primary-color) !important;
background: var(--bg-color) !important;
}
.cs-filter::placeholder {
color: var(--text-secondary);
font-size: 0.75rem;
}
.cs-filter-reset {
position: absolute;
right: 2px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: var(--text-secondary);
font-size: 1rem;
cursor: pointer;
padding: 0 5px;
line-height: 1;
border-radius: 50%;
transition: color 0.15s, background 0.15s;
display: none;
}
.cs-filter-reset:hover {
color: var(--text-color);
background: var(--border-color);
}
/* Responsive adjustments */
@media (max-width: 768px) {
.templates-grid {
grid-template-columns: 1fr;
}
}