Add resumable downloads, download paths, queue controls and history

This commit is contained in:
SirBlob committed 2026-11-01 13:36:29 -05:00
1 parent 434f6441da
commit 6027cfabb9
43 files changed
+2138 -291

No files matched your search

+57 -3
View File
@@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#16181d">
<title>DDC</title>
<link rel="icon" href="data:,">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/style.css">
<script src="/js/theme.js"></script>
<script type="module" src="/js/app.js"></script>
@@ -46,9 +46,25 @@
<section class="card">
<h2>New download</h2>
<form id="download-form" class="download-form">
<input id="download-url" type="url" inputmode="url" placeholder="https://example.com/file.zip" autocomplete="off" autocapitalize="off" required>
<textarea id="download-urls" rows="2" placeholder="https://example.com/file.zip (one link per line, Ctrl+Enter to start)" autocomplete="off" autocapitalize="off" spellcheck="false" required></textarea>
<button type="submit" class="primary">Download</button>
</form>
<div class="download-options">
<label class="field">
<span>File name (optional, single link)</span>
<input id="download-name" placeholder="Keep the server name" autocomplete="off" autocapitalize="off">
</label>
<label class="field">
<span>Download to</span>
<select id="download-destination">
<option value="">Temporary folder (move later)</option>
</select>
</label>
<label class="field">
<span>Subfolder (optional)</span>
<input id="download-subfolder" placeholder="Movie Name (2024)" autocomplete="off" disabled>
</label>
</div>
<label class="checkbox">
<input id="auto-extract" type="checkbox" checked>
<span>Extract archives automatically</span>
@@ -57,7 +73,20 @@
</section>
<section class="card">
<h2>Downloads</h2>
<div class="list-toolbar">
<h2>Downloads</h2>
<div class="list-toolbar-actions">
<select id="job-filter" aria-label="Filter downloads">
<option value="all">All</option>
<option value="active">Active</option>
<option value="paused">Paused</option>
<option value="ready">Ready</option>
<option value="completed">Completed</option>
<option value="failed">Failed</option>
</select>
<button id="clear-completed-button" type="button" class="ghost small">Clear completed</button>
</div>
</div>
<ul id="job-list" class="job-list"></ul>
<p id="job-empty" class="empty-state">No downloads yet. Paste a link above to start.</p>
</section>
@@ -86,6 +115,15 @@
<button id="move-button" type="button" class="primary block-mobile" disabled>Move</button>
<p id="action-error" class="error" role="alert"></p>
</section>
<details id="history-card" class="card history-card">
<summary>
<span id="history-title">History</span>
</summary>
<ul id="history-list" class="history-list"></ul>
<p id="history-empty" class="empty-state">Moved files will be listed here.</p>
<button id="clear-history-button" type="button" class="ghost small">Clear history</button>
</details>
</main>
</div>
@@ -104,6 +142,10 @@
<span>Parallel downloads</span>
<input id="setting-concurrent" type="number" inputmode="numeric" min="1" max="10" required>
</label>
<label class="field">
<span>Connections per download</span>
<input id="setting-connections" type="number" inputmode="numeric" min="1" max="16" required>
</label>
<label class="field">
<span>Keep free on disk (GB)</span>
<input id="setting-min-free" type="number" inputmode="numeric" min="0" required>
@@ -127,6 +169,14 @@
</label>
</fieldset>
<fieldset class="settings-group">
<legend>Download paths</legend>
<label class="field">
<span>One folder per line, inside a destination root. Missing folders are created on first use.</span>
<textarea id="setting-download-paths" rows="4" placeholder="/media/blob/TeaNet/Plex/Movies/Kids" autocomplete="off" autocapitalize="off" spellcheck="false"></textarea>
</label>
</fieldset>
<fieldset class="settings-group">
<legend>Appearance</legend>
<label class="field">
@@ -137,6 +187,10 @@
<option value="dark">Dark</option>
</select>
</label>
<label class="checkbox">
<input id="setting-notifications" type="checkbox">
<span>Notify when downloads finish (this browser)</span>
</label>
</fieldset>
<fieldset class="settings-group">