added download monitor

This commit is contained in:
2026-01-06 19:26:06 +01:00
parent ba05e08e71
commit 8296e8d7da
12 changed files with 616 additions and 30 deletions

View File

@@ -795,4 +795,144 @@
display: flex;
justify-content: flex-end;
gap: 1rem;
}
/* =========================================
DOWNLOAD MANAGER (COMPACTO)
========================================= */
.downloads-monitor {
background: var(--color-bg-elevated, #18181b);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
margin-bottom: 2rem;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.monitor-header {
background: rgba(255, 255, 255, 0.03);
padding: 0.8rem 1.2rem; /* Header más delgado */
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
display: flex;
justify-content: space-between;
align-items: center;
}
.monitor-title h3 {
margin: 0;
font-size: 0.9rem;
color: white;
display: flex; align-items: center; gap: 0.6rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.monitor-list {
padding: 0;
max-height: 250px;
overflow-y: auto;
}
/* --- ITEM COMPACTO --- */
.dl-item.compact {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.6rem 1.2rem; /* Mucho menos padding vertical */
border-bottom: 1px solid rgba(255,255,255,0.05);
background: transparent;
transition: background 0.2s;
gap: 1.5rem;
}
.dl-item.compact:last-child { border-bottom: none; }
.dl-item.compact:hover { background: rgba(255,255,255,0.02); }
/* Columna Izquierda: Nombres */
.dl-left-col {
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
flex: 1; /* Ocupa el espacio disponible */
min-width: 0; /* Permite truncar texto */
}
.dl-filename {
font-size: 0.9rem;
font-weight: 600;
color: #f4f4f5;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-family: 'Consolas', monospace;
margin-bottom: 2px;
}
.dl-folder {
font-size: 0.75rem;
color: #71717a;
display: flex;
align-items: center;
gap: 0.4rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dl-folder svg {
color: var(--color-primary, #8b5cf6);
opacity: 0.8;
}
/* Columna Derecha: Progreso y Stats */
.dl-right-col {
width: 40%; /* Ancho fijo para la zona de progreso */
max-width: 300px;
min-width: 150px;
display: flex;
flex-direction: column;
justify-content: center;
gap: 4px;
}
.dl-meta-info {
display: flex;
justify-content: space-between;
font-size: 0.7rem;
color: #a1a1aa;
font-weight: 500;
}
.dl-status-text.completed { color: #4ade80; }
.dl-status-text.failed { color: #ef4444; }
/* Barra de progreso más fina */
.dl-progress-track {
width: 100%;
height: 4px; /* Barra delgada */
background: rgba(255,255,255,0.08);
border-radius: 2px;
overflow: hidden;
}
.dl-progress-fill {
height: 100%;
background: var(--color-primary, #8b5cf6);
border-radius: 2px;
transition: width 0.3s ease-out;
width: 0%;
}
.dl-progress-fill.completed { background: #4ade80; }
.dl-progress-fill.failed { background: #ef4444; }
/* Responsive para móviles */
@media (max-width: 600px) {
.dl-item.compact {
flex-direction: column;
align-items: stretch;
gap: 0.8rem;
}
.dl-right-col { width: 100%; max-width: none; }
}

View File

@@ -84,6 +84,22 @@
<div id="section-local" class="tab-section">
<div id="downloads-monitor" class="downloads-monitor">
<div class="monitor-header">
<div class="monitor-title">
<span class="pulse-dot"></span>
<h3>Download Manager</h3>
</div>
<div class="monitor-stats">
<span id="dl-stat-active">0 Active</span>
<span class="divider"></span>
<span id="dl-stat-failed">0 Failed</span>
</div>
</div>
<div id="downloads-list-container" class="monitor-list">
</div>
</div>
<div class="toolbar local-toolbar">
<div class="search-box">
<svg width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>