Files
mediaproc/ui/chunker/src/App.css
2026-03-15 16:03:53 -03:00

505 lines
7.8 KiB
CSS

@import "../../common/styles/theme.css";
/* ---- Layout ---- */
.app {
display: flex;
flex-direction: column;
height: 100vh;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 1.25rem;
background: var(--bg-panel);
border-bottom: 1px solid var(--border);
}
.header h1 {
font-size: 1.1rem;
font-weight: 600;
letter-spacing: -0.01em;
}
.connection-status {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.8rem;
color: var(--text-muted);
}
.dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--text-muted);
}
.dot.connected {
background: var(--success);
box-shadow: 0 0 6px var(--success);
}
.error-banner {
padding: 0.5rem 1.25rem;
background: #7f1d1d;
color: #fca5a5;
font-size: 0.85rem;
}
.layout {
display: flex;
flex: 1;
overflow: hidden;
}
.sidebar {
width: 300px;
background: var(--bg-surface);
border-right: 1px solid var(--border);
overflow-y: auto;
}
.main {
flex: 1;
overflow-y: auto;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.main-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.main-left,
.main-right {
display: flex;
flex-direction: column;
gap: 1rem;
}
/* ---- Selected Asset Info ---- */
.selected-asset-info {
padding: 0.5rem;
background: #1e293b;
border: 1px solid #334155;
border-radius: var(--radius);
margin-bottom: 0.75rem;
}
.asset-detail {
display: block;
font-size: 0.8rem;
color: var(--text-primary);
font-weight: 500;
}
.asset-detail-meta {
display: block;
font-size: 0.65rem;
color: #64748b;
margin-top: 0.15rem;
}
/* ---- Config Panel ---- */
.config-panel {
padding: 1rem;
}
.config-field {
margin-bottom: 0.75rem;
}
.config-field label {
display: block;
font-size: 0.75rem;
color: var(--text-secondary);
margin-bottom: 0.25rem;
}
.config-field .default {
color: var(--text-muted);
font-style: italic;
}
.config-field input,
.config-field select {
width: 100%;
padding: 0.4rem 0.5rem;
font-size: 0.8rem;
background: var(--bg-input);
color: var(--text-primary);
border: 1px solid var(--border);
border-radius: var(--radius);
}
.config-field input:focus,
.config-field select:focus {
outline: none;
border-color: var(--accent);
}
.start-button {
width: 100%;
padding: 0.5rem;
font-size: 0.85rem;
background: var(--success);
color: #000;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
margin-top: 0.5rem;
transition: background 0.2s;
}
.start-button:hover:not(:disabled) {
background: #059669;
}
.start-button:disabled {
background: var(--bg-input);
color: var(--text-muted);
cursor: not-allowed;
}
.stop-button {
width: 100%;
padding: 0.5rem;
font-size: 0.85rem;
background: var(--error);
color: #fff;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
margin-top: 0.5rem;
transition: background 0.2s;
}
.stop-button:hover {
background: #dc2626;
}
.reset-button {
width: 100%;
padding: 0.5rem;
font-size: 0.85rem;
background: #1e293b;
color: #94a3b8;
border: 1px solid #334155;
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
margin-top: 0.5rem;
transition: all 0.2s;
}
.reset-button:hover {
background: #334155;
color: var(--text-primary);
}
.range-row {
display: flex;
align-items: center;
gap: 0.5rem;
}
.range-row input {
flex: 1;
padding: 0.4rem 0.5rem;
font-size: 0.8rem;
background: var(--bg-input);
color: var(--text-primary);
border: 1px solid var(--border);
border-radius: var(--radius);
}
.range-row input:focus {
outline: none;
border-color: var(--accent);
}
.range-sep {
font-size: 0.75rem;
color: var(--text-muted);
}
/* ---- Chunk Grid ---- */
.chunk-grid-panel {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
}
.chunk-count {
font-size: 0.7rem;
color: var(--text-muted);
font-weight: 400;
}
.chunk-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
gap: 3px;
max-height: 200px;
overflow-y: auto;
}
.chunk-cell {
aspect-ratio: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.55rem;
color: rgba(255, 255, 255, 0.6);
border-radius: 3px;
transition: background 0.3s;
}
.chunk-legend {
display: flex;
gap: 0.75rem;
margin-top: 0.5rem;
flex-wrap: wrap;
}
.legend-item {
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.65rem;
color: var(--text-secondary);
}
.legend-dot {
width: 8px;
height: 8px;
border-radius: 2px;
}
/* ---- Worker Panel ---- */
.worker-panel {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
}
.worker-cards {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.worker-card {
padding: 0.5rem 0.75rem;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 6px;
}
.worker-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.worker-name {
font-size: 0.8rem;
font-weight: 500;
}
.worker-state {
font-size: 0.7rem;
text-transform: uppercase;
font-weight: 600;
}
.worker-chunk {
font-size: 0.7rem;
color: var(--text-muted);
margin-top: 0.15rem;
}
.worker-stats {
display: flex;
gap: 0.75rem;
font-size: 0.65rem;
color: var(--text-muted);
margin-top: 0.25rem;
}
.worker-empty {
font-size: 0.8rem;
color: var(--text-muted);
text-align: center;
padding: 1rem;
}
/* ---- Queue Gauge ---- */
.queue-gauge {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
}
.gauge-row {
margin-bottom: 0.5rem;
}
.gauge-label {
font-size: 0.75rem;
color: var(--text-secondary);
margin-bottom: 0.25rem;
}
.gauge-value {
color: var(--text-primary);
font-weight: 600;
}
.gauge-bar {
height: 8px;
background: var(--bg-input);
border-radius: var(--radius);
overflow: hidden;
}
.gauge-fill {
height: 100%;
border-radius: var(--radius);
transition: width 0.3s, background 0.3s;
}
.gauge-note {
font-size: 0.65rem;
color: var(--text-muted);
}
/* ---- Stats Panel ---- */
.stats-panel {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
}
.stat {
text-align: center;
padding: 0.5rem;
background: var(--bg-panel);
border-radius: 6px;
}
.stat-value {
font-size: 1.1rem;
font-weight: 700;
color: var(--text-primary);
}
.stat-label {
font-size: 0.6rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 0.15rem;
}
/* ---- Error Log ---- */
.error-log {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
}
.error-count {
font-size: 0.7rem;
background: #7f1d1d;
color: #fca5a5;
padding: 0.1rem 0.4rem;
border-radius: 8px;
font-weight: 400;
}
.error-entries {
max-height: 150px;
overflow-y: auto;
}
.error-empty {
font-size: 0.8rem;
color: var(--text-muted);
text-align: center;
padding: 0.5rem;
}
.error-entry {
display: flex;
gap: 0.5rem;
align-items: center;
padding: 0.35rem 0;
border-bottom: 1px solid var(--bg-panel);
font-size: 0.7rem;
flex-wrap: wrap;
}
.error-type {
color: var(--error);
font-weight: 500;
}
.error-seq {
color: var(--warning);
}
.error-worker {
color: var(--accent);
}
.error-msg {
color: var(--text-secondary);
flex: 1;
}
.error-retries {
color: #f97316;
font-size: 0.65rem;
}
/* ---- Output download link ---- */
.fm-download-link {
font-size: 0.7rem;
color: var(--accent);
text-decoration: none;
}
.fm-download-link:hover {
text-decoration: underline;
}