feat(ui): add clear queue flow and expose ISO expiry
- Add `formatBrowserTime()` and include ISO-8601 `expires_at` in box status JSON and `ExpiresAtISO` in the box view for browser-friendly rendering. - Refresh UI styling (switch to MonoCraft/PixelOperatorMono, tweak base font size) and treat `aria-disabled="true"` like `disabled` for consistent button states. - Introduce a clear-queue action with confirmation to reset upload state, unlock controls, and provide user feedback.feat(ui): add clear queue flow and expose ISO expiry - Add `formatBrowserTime()` and include ISO-8601 `expires_at` in box status JSON and `ExpiresAtISO` in the box view for browser-friendly rendering. - Refresh UI styling (switch to MonoCraft/PixelOperatorMono, tweak base font size) and treat `aria-disabled="true"` like `disabled` for consistent button states. - Introduce a clear-queue action with confirmation to reset upload state, unlock controls, and provide user feedback.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
<h3>WarpBox</h3>
|
||||
<p><strong>WarpBox</strong> was made by <strong>Daniel Legt</strong>.</p>
|
||||
<p>Temporary file boxes, terminal-friendly uploads, and old-web UI charm.</p>
|
||||
<div class="about-popup-content">
|
||||
<h3>WarpBox</h3>
|
||||
<p><strong>WarpBox</strong> was made by <strong>Daniel Legt</strong>.</p>
|
||||
<p>Temporary file boxes, terminal-friendly uploads, and old-web UI charm.</p>
|
||||
<p><strong>Version:</strong> v1.3.8a</p>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,33 @@
|
||||
<h3>Upload with cURL</h3>
|
||||
<p>WarpBox accepts normal multipart form uploads through the compatibility endpoint:</p>
|
||||
<pre>curl \
|
||||
<code class="code-block">curl \
|
||||
-F 'files=@./my-file.zip' \
|
||||
-F 'retention=1h' \
|
||||
{{ origin }}/upload
|
||||
</pre>
|
||||
</code>
|
||||
<h4>Browser flow</h4>
|
||||
<p>The browser uses the manifest API: it creates a box, uploads each file, and marks failed uploads so the download page does not wait forever.</p>
|
||||
<h4>Make a WarpBox executable</h4>
|
||||
<p>Save this as <code>warpbox</code>, make it executable, and put it somewhere on your <code>PATH</code>.</p>
|
||||
<code class="code-block">#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Usage: warpbox FILE [FILE ...]" >&2
|
||||
exit 64
|
||||
fi
|
||||
|
||||
endpoint="${WARPBOX_URL:-{{ origin }}}/upload"
|
||||
retention="${WARPBOX_RETENTION:-1h}"
|
||||
|
||||
args=(-F "retention=${retention}")
|
||||
for file in "$@"; do
|
||||
args+=(-F "files=@${file}")
|
||||
done
|
||||
|
||||
curl "${args[@]}" "${endpoint}"
|
||||
</code>
|
||||
<code class="code-block">chmod +x ./warpbox
|
||||
sudo install -m 755 ./warpbox /usr/local/bin/warpbox
|
||||
warpbox ./my-file.zip
|
||||
</code>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<h3>Upload examples</h3>
|
||||
<h4>Basic CLI upload</h4>
|
||||
<pre>curl \
|
||||
<code class="code-block">curl \
|
||||
-F 'files=@./photo.png' \
|
||||
-F 'retention=24h' \
|
||||
{{ origin }}/upload
|
||||
</pre>
|
||||
</code>
|
||||
<h4>Multiple files with password</h4>
|
||||
<pre>curl \
|
||||
<code class="code-block">curl \
|
||||
-F 'files=@./one.png' \
|
||||
-F 'files=@./two.zip' \
|
||||
-F 'retention=1h' \
|
||||
-F 'password=secret-pass' \
|
||||
{{ origin }}/upload
|
||||
</pre>
|
||||
</code>
|
||||
<h4>Go</h4>
|
||||
<pre>package main
|
||||
<code class="code-block">package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@@ -48,9 +48,9 @@ func main() {
|
||||
out, _ := io.ReadAll(resp.Body)
|
||||
fmt.Println(string(out))
|
||||
}
|
||||
</pre>
|
||||
</code>
|
||||
<h4>Java 11+ HttpClient</h4>
|
||||
<pre>import java.net.URI;
|
||||
<code class="code-block">import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
@@ -84,9 +84,9 @@ public class UploadWarpBox {
|
||||
System.out.println(response.body());
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</code>
|
||||
<h4>JavaScript Node.js</h4>
|
||||
<pre>import { openAsBlob } from 'node:fs';
|
||||
<code class="code-block">import { openAsBlob } from 'node:fs';
|
||||
|
||||
const file = await openAsBlob('./photo.png');
|
||||
const form = new FormData();
|
||||
@@ -99,4 +99,4 @@ const res = await fetch('{{ origin }}/upload', {
|
||||
});
|
||||
|
||||
console.log(await res.text());
|
||||
</pre>
|
||||
</code>
|
||||
|
||||
Reference in New Issue
Block a user