Introduce a `one-time` retention option and persist it on the manifest as `one_time_download`. One-time download boxes bypass retention expiry scheduling, force zip downloads, and reject download attempts until all files are complete to prevent partial retrievals.feat(boxstore): add one-time download retention mode Introduce a `one-time` retention option and persist it on the manifest as `one_time_download`. One-time download boxes bypass retention expiry scheduling, force zip downloads, and reject download attempts until all files are complete to prevent partial retrievals.
81 lines
4.2 KiB
HTML
81 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>WarpBox - {{ .BoxID }}</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/box.css">
|
||
</head>
|
||
|
||
<body>
|
||
<main>
|
||
<section class="win98-window box-window" aria-labelledby="box-window-title">
|
||
<header class="win98-titlebar box-titlebar">
|
||
<div class="win98-titlebar-label">
|
||
<img class="win98-titlebar-icon" src="/static/WarpBoxLogo.png" alt="" aria-hidden="true">
|
||
<h1 id="box-window-title">WarpBox Explorer - {{ .BoxID }}</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>
|
||
|
||
<div class="win98-menu box-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">Tools</span>
|
||
<span class="win98-menu-option">Help</span>
|
||
</div>
|
||
|
||
<div class="box-toolbar">
|
||
<a class="win98-button box-toolbar-button" href="/">Upload</a>
|
||
{{ if .DownloadAll }}
|
||
<a class="win98-button box-toolbar-button" href="{{ .DownloadAll }}">Download Zip</a>
|
||
{{ end }}
|
||
</div>
|
||
|
||
<div class="box-address">
|
||
<span>Address</span>
|
||
<code>/box/{{ .BoxID }}</code>
|
||
</div>
|
||
|
||
{{ if .RetentionLabel }}
|
||
<div class="box-meta">
|
||
<span>Retention</span>
|
||
<span>{{ .RetentionLabel }}</span>
|
||
</div>
|
||
{{ end }}
|
||
|
||
<div class="win98-panel box-panel" data-box-id="{{ .BoxID }}" data-poll-ms="{{ .PollMS }}" data-zip-only="{{ if .ZipOnly }}true{{ else }}false{{ end }}">
|
||
{{ if .Files }}
|
||
<div class="box-file-grid" aria-label="Uploaded files">
|
||
{{ range .Files }}
|
||
<a class="box-file {{ if .IsComplete }}is-complete{{ else if eq .Status "failed" }}is-failed{{ else }}is-loading{{ end }} {{ if .ThumbnailURL }}has-thumbnail{{ end }}" href="{{ if and .IsComplete (not $.ZipOnly) }}{{ .DownloadPath }}{{ else }}#{{ end }}" title="{{ if $.ZipOnly }}Available in ZIP download{{ else }}{{ .Title }}{{ end }}" data-file-id="{{ .ID }}" data-status="{{ .Status }}" {{ if and .IsComplete (not $.ZipOnly) }}download{{ else }}aria-disabled="true"{{ end }}>
|
||
<img class="box-file-icon" src="{{ if .ThumbnailURL }}{{ .ThumbnailURL }}{{ else }}{{ .IconPath }}{{ end }}" alt="" aria-hidden="true">
|
||
<span class="box-file-name">{{ .Name }}</span>
|
||
<span class="box-file-meta">{{ .StatusLabel }} · {{ .SizeLabel }}</span>
|
||
</a>
|
||
{{ end }}
|
||
</div>
|
||
{{ else }}
|
||
<p class="box-empty">This box is empty.</p>
|
||
{{ end }}
|
||
</div>
|
||
|
||
<div class="win98-statusbar box-statusbar" aria-live="polite">
|
||
<span>{{ .FileCount }} item(s)</span>
|
||
<span>WarpBox</span>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
<script src="/static/js/box.js"></script>
|
||
</body>
|
||
</html>
|