Files
WarpBox/templates/index.html
Daniel Legt c1489d1fbb feat(ui): add file-type icons and clamp window titles
Add a file-to-icon resolver for common MIME types/extensions so uploads
display appropriate Win98-style icons. Update upload and window CSS to
use image-based, pixelated icons, and prevent long window titles from
overflowing by adding a flex label with ellipsis handling.feat(ui): add file-type icons and clamp window titles

Add a file-to-icon resolver for common MIME types/extensions so uploads
display appropriate Win98-style icons. Update upload and window CSS to
use image-based, pixelated icons, and prevent long window titles from
overflowing by adding a flex label with ellipsis handling.
2026-04-27 18:37:05 +03:00

106 lines
5.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Warpbox</title>
<link rel="icon" type="image/png" href="/static/WarpBoxLogo.png">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/static/css/app.css">
<link rel="stylesheet" href="/static/css/window.css">
<link rel="stylesheet" href="/static/css/upload.css">
</head>
<body>
<main>
<section class="win98-window upload-window" aria-labelledby="upload-window-title">
<header class="win98-titlebar upload-titlebar">
<div class="win98-titlebar-label">
<img class="win98-titlebar-icon" src="/static/WarpBoxLogo.png" alt="" aria-hidden="true">
<h1 id="upload-window-title">WarpBox Upload</h1>
</div>
<div class="win98-window-controls" aria-hidden="true">
<span class="win98-control">_</span>
<span class="win98-control"></span>
<span class="win98-control">×</span>
</div>
</header>
<form class="upload-form" action="/upload" method="post" enctype="multipart/form-data">
<div class="win98-menu upload-menu" aria-hidden="true">
<span class="win98-menu-option">File</span>
<span class="win98-menu-option">Edit</span>
<span class="win98-menu-option">View</span>
<span class="win98-menu-option">Help</span>
</div>
<div class="win98-panel upload-panel">
<label class="upload-dropzone" for="file-upload">
<span class="upload-icon" aria-hidden="true"></span>
<span class="upload-primary">Drop file here</span>
<span class="upload-secondary">or click Browse to choose one</span>
</label>
<input id="file-upload" class="upload-input" type="file" name="files" multiple>
<fieldset class="upload-options">
<legend>Box options</legend>
<label class="upload-option-row" for="upload-retention">
<span>Keep files</span>
<select id="upload-retention" class="upload-select" name="retention">
{{ range .RetentionOptions }}
<option value="{{ .Key }}" {{ if eq .Key $.DefaultRetention }}selected{{ end }}>{{ .Label }}</option>
{{ end }}
</select>
</label>
<label class="upload-check-row" for="upload-password-enabled">
<input id="upload-password-enabled" type="checkbox">
<span>Password protect this box</span>
</label>
<input id="upload-password" class="upload-text-input" type="password" autocomplete="new-password" placeholder="Password" disabled>
<label class="upload-check-row" for="upload-zip-enabled">
<input id="upload-zip-enabled" type="checkbox" checked>
<span>Allow Download Zip</span>
</label>
</fieldset>
<div class="upload-details">
<span class="upload-detail-label">Selected Files</span>
<span id="upload-file-count" class="upload-file-count">0 files</span>
</div>
<div class="upload-result is-hidden" aria-live="polite">
<span class="upload-result-label">Folder link</span>
<a id="upload-box-link" class="upload-result-link is-empty" href="#" aria-disabled="true">Waiting for upload</a>
<button id="upload-share-button" class="win98-button upload-share-button" type="button" disabled>Share</button>
</div>
<div class="upload-file-list" aria-live="polite" aria-label="Selected files">
<p class="upload-empty-state">No files selected</p>
</div>
</div>
<footer class="upload-actions">
<label class="win98-button" for="file-upload">Browse...</label>
<button class="win98-button" type="submit">Upload</button>
</footer>
<div class="upload-overall" aria-live="polite">
<div class="upload-overall-track" aria-hidden="true">
<span class="upload-overall-bar"></span>
</div>
<span class="upload-overall-percent">0%</span>
</div>
<div class="win98-statusbar upload-statusbar" aria-live="polite">
<span>Ready</span>
<span>WarpBox</span>
</div>
</form>
</section>
</main>
<script src="/static/js/app.js"></script>
</body>
</html>