Initial DDC release

This commit is contained in:
SirBlob committed 2026-10-25 20:24:50 -04:00
commit 434f6441da
57 files changed
+4606

No files matched your search

+162
View File
@@ -0,0 +1,162 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<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="stylesheet" href="/style.css">
<script src="/js/theme.js"></script>
<script type="module" src="/js/app.js"></script>
</head>
<body>
<section id="login-view" class="login-view" hidden>
<form id="login-form" class="card login-card">
<div class="login-brand">
<span class="brand-mark">DDC</span>
<p class="muted">Direct Download Client</p>
</div>
<label class="field">
<span>Username</span>
<input name="username" autocomplete="username" autocapitalize="off" required>
</label>
<label class="field">
<span>Password</span>
<input name="password" type="password" autocomplete="current-password" required>
</label>
<button type="submit" class="primary block">Sign in</button>
<p id="login-error" class="error" role="alert"></p>
</form>
</section>
<div id="app-view" class="app" hidden>
<header class="topbar">
<div class="topbar-inner">
<span class="brand-mark">DDC</span>
<span id="disk-status" class="chip"></span>
<div class="topbar-actions">
<button id="settings-button" type="button" class="ghost">Settings</button>
<button id="logout-button" type="button" class="ghost">Sign out</button>
</div>
</div>
</header>
<main class="content">
<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>
<button type="submit" class="primary">Download</button>
</form>
<label class="checkbox">
<input id="auto-extract" type="checkbox" checked>
<span>Extract archives automatically</span>
</label>
<p id="download-error" class="error" role="alert"></p>
</section>
<section class="card">
<h2>Downloads</h2>
<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>
<section id="job-detail" class="card" hidden>
<div class="detail-header">
<h2 id="detail-title"></h2>
<button id="close-detail-button" type="button" class="ghost small">Close</button>
</div>
<div id="file-tree" class="file-tree"></div>
<p id="selection-summary" class="muted small-text"></p>
<div class="move-controls">
<label class="field">
<span>Destination</span>
<select id="library-select"></select>
</label>
<label class="field">
<span>Subfolder (optional)</span>
<input id="subfolder-input" placeholder="Movie Name (2024)" autocomplete="off">
</label>
</div>
<label class="checkbox">
<input id="cleanup-checkbox" type="checkbox" checked>
<span>Delete remaining temporary files after the move</span>
</label>
<button id="move-button" type="button" class="primary block-mobile" disabled>Move</button>
<p id="action-error" class="error" role="alert"></p>
</section>
</main>
</div>
<dialog id="settings-dialog" class="sheet">
<form id="settings-form" class="sheet-form">
<header class="sheet-header">
<h2>Settings</h2>
<button id="settings-close" type="button" class="ghost small">Close</button>
</header>
<div class="sheet-body">
<fieldset class="settings-group">
<legend>Downloads</legend>
<div class="settings-grid">
<label class="field">
<span>Parallel downloads</span>
<input id="setting-concurrent" type="number" inputmode="numeric" min="1" max="10" required>
</label>
<label class="field">
<span>Keep free on disk (GB)</span>
<input id="setting-min-free" type="number" inputmode="numeric" min="0" required>
</label>
</div>
<label class="field">
<span>Allowed ports</span>
<input id="setting-ports" placeholder="80, 443 or * for any" autocomplete="off">
</label>
</fieldset>
<fieldset class="settings-group">
<legend>Defaults</legend>
<label class="checkbox">
<input id="setting-auto-extract" type="checkbox">
<span>Extract archives automatically</span>
</label>
<label class="checkbox">
<input id="setting-cleanup" type="checkbox">
<span>Delete temporary files after a move</span>
</label>
</fieldset>
<fieldset class="settings-group">
<legend>Appearance</legend>
<label class="field">
<span>Theme (this browser)</span>
<select id="setting-theme">
<option value="system">System</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
</label>
</fieldset>
<fieldset class="settings-group">
<legend>Server</legend>
<dl class="info-list">
<dt>Download folder</dt>
<dd id="info-download-dir" class="mono"></dd>
<dt>Destination roots</dt>
<dd id="info-roots"></dd>
</dl>
</fieldset>
<p id="settings-error" class="error" role="alert"></p>
</div>
<footer class="sheet-footer">
<button id="settings-cancel" type="button" class="ghost">Cancel</button>
<button type="submit" class="primary">Save</button>
</footer>
</form>
</dialog>
</body>
</html>