diff --git a/templates/index.html b/templates/index.html
index c80bdff..6e4667c 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -132,12 +132,144 @@
color: #000;
}
+ .btn-secondary {
+ background: rgba(255, 255, 255, 0.1);
+ color: #fff;
+ }
+
+ .btn-secondary:hover {
+ background: rgba(255, 255, 255, 0.2);
+ }
+
+ .section-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 20px;
+ margin-top: 40px;
+ }
+
+ .section-header h2 {
+ font-size: 1.8em;
+ margin: 0;
+ background: linear-gradient(45deg, #00d9ff, #00ff88);
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+
+ .downloads-stats {
+ display: flex;
+ gap: 15px;
+ font-size: 0.85em;
+ }
+
+ .stat-item {
+ background: rgba(255, 255, 255, 0.05);
+ padding: 5px 12px;
+ border-radius: 15px;
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ }
+
+ .stat-count {
+ font-weight: bold;
+ color: #00d9ff;
+ }
+
+ .downloads-controls {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 12px;
+ margin-bottom: 20px;
+ background: rgba(255, 255, 255, 0.03);
+ padding: 15px;
+ border-radius: 10px;
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ }
+
+ .filter-group {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ }
+
+ .filter-group label {
+ font-size: 0.85em;
+ color: #aaa;
+ white-space: nowrap;
+ }
+
+ .filter-group select,
+ .filter-group input {
+ padding: 8px 12px;
+ border: 1px solid rgba(255, 255, 255, 0.15);
+ border-radius: 6px;
+ background: rgba(0, 0, 0, 0.3);
+ color: #fff;
+ font-size: 13px;
+ min-width: 120px;
+ }
+
+ .filter-group select:focus,
+ .filter-group input:focus {
+ outline: none;
+ border-color: #00d9ff;
+ }
+
+ .search-group input {
+ min-width: 200px;
+ }
+
+ .actions-group {
+ margin-left: auto;
+ }
+
.downloads-list {
display: flex;
flex-direction: column;
gap: 15px;
}
+ .downloads-group {
+ margin-bottom: 20px;
+ }
+
+ .downloads-group-header {
+ background: rgba(255, 255, 255, 0.08);
+ padding: 12px 18px;
+ border-radius: 8px;
+ margin-bottom: 12px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ cursor: pointer;
+ user-select: none;
+ transition: all 0.3s;
+ }
+
+ .downloads-group-header:hover {
+ background: rgba(255, 255, 255, 0.12);
+ }
+
+ .downloads-group-title {
+ font-weight: 600;
+ font-size: 1.05em;
+ color: #00d9ff;
+ }
+
+ .downloads-group-count {
+ background: rgba(0, 217, 255, 0.2);
+ padding: 4px 10px;
+ border-radius: 12px;
+ font-size: 0.85em;
+ color: #00d9ff;
+ }
+
+ .downloads-group-items {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+ }
+
.download-item {
background: rgba(255, 255, 255, 0.05);
border-radius: 10px;
@@ -620,6 +752,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`;
return;
}
- container.innerHTML = downloads.map(dl => `
+ // Group downloads if needed
+ const groups = groupBy !== 'none' ? groupDownloads(downloads, groupBy) : null;
+
+ if (groups) {
+ // Display grouped downloads
+ let html = '';
+ for (const [groupName, groupDownloads] of Object.entries(groups)) {
+ html += `
+
+
+
+ ${groupDownloads.map(dl => renderDownloadItem(dl)).join('')}
+
+
+ `;
+ }
+ container.innerHTML = html;
+ } else {
+ // Display flat list
+ container.innerHTML = downloads.map(dl => renderDownloadItem(dl)).join('');
+ }
+ }
+
+ function renderDownloadItem(dl) {
+ return `
${dl.error ? `
${escapeHtml(dl.error)}
` : ''}
- `).join('');
+ `;
+ }
+
+ function toggleGroup(header) {
+ const items = header.nextElementSibling;
+ items.style.display = items.style.display === 'none' ? 'flex' : 'none';
+ header.classList.toggle('collapsed');
}
async function pauseDownload(id) {