Files
warpbox-dev/backend/templates/pages/manage.html
Daniel Legt 3471e2b0cf feat(api): add API documentation and ShareX integration
- Add an API documentation page with curl and ShareX examples.
- Implement a dynamic ShareX configuration endpoint (`/api/v1/sharex/warpbox-anonymous.sxcu`) that generates a `.sxcu` file pre-configured with the instance's base URL.
- Update anonymous uploads to return a private management link (`manageUrl`) and a deletion link (`deleteUrl`) in JSON responses.
- Update README with details on Stage 3 Anonymous Integrations.
- Add styling for the new API documentation view and management details.
2026-05-29 23:44:05 +03:00

33 lines
1.6 KiB
HTML

{{define "manage.html"}}{{template "base" .}}{{end}}
{{define "content"}}
<section class="download-view" aria-labelledby="manage-title">
<div class="card download-card">
<div class="card-content">
<div class="file-emblem" aria-hidden="true">
<svg viewBox="0 0 24 24" role="img" focusable="false"><path d="M3 6h18" /><path d="M8 6V4h8v2" /><path d="M19 6l-1 14H6L5 6" /><path d="M10 11v5" /><path d="M14 11v5" /></svg>
</div>
<h1 id="manage-title">Manage upload</h1>
<p class="download-subtitle">This private link can delete the entire box.</p>
<dl class="manage-details">
<div><dt>Box</dt><dd><code>{{.Data.Box.ID}}</code></dd></div>
<div><dt>Files</dt><dd>{{.Data.FileCount}}</dd></div>
<div><dt>Total size</dt><dd>{{.Data.TotalSize}}</dd></div>
<div><dt>Expires</dt><dd>{{.Data.ExpiresLabel}}</dd></div>
<div><dt>Downloads</dt><dd>{{.Data.DownloadCount}}{{if .Data.MaxDownloads}} / {{.Data.MaxDownloads}}{{end}}</dd></div>
<div><dt>Protected</dt><dd>{{if .Data.Protected}}Yes{{else}}No{{end}}</dd></div>
</dl>
<form action="{{.Data.DeleteActionURL}}" method="post">
<button class="button button-danger button-wide" type="submit">
<svg viewBox="0 0 24 24" role="img" focusable="false" aria-hidden="true"><path d="M3 6h18" /><path d="M8 6V4h8v2" /><path d="M19 6l-1 14H6L5 6" /></svg>
Delete upload
</button>
</form>
<a class="button button-outline button-wide" href="/d/{{.Data.Box.ID}}">Back to box</a>
</div>
</div>
</section>
{{end}}