Files
send-it/templates/download.html
2026-02-26 18:52:42 +01:00

67 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>send.it</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
* { border-radius: 0 !important; transition: none !important; }
body { font-family: sans-serif; background: #fff; color: #000; }
.box { border: 2px solid #000; padding: 20px; background: #fff; }
.input-text { border: 1px solid #000; padding: 4px 8px; background: #f9f9f9; width: 100%; font-size: 12px; }
label { font-size: 10px; font-weight: bold; display: block; margin-bottom: 2px; color: #666; }
.section { margin-bottom: 16px; }
button { border: 1px solid #000; background: #eee; padding: 2px 8px; font-size: 10px; margin-top: 4px; }
button:hover { background: #ddd; }
</style>
</head>
<body class="min-h-screen flex items-center justify-center p-4">
<div class="w-full max-w-lg box">
<h2 class="text-lg font-bold uppercase mb-4 border-b-2 border-black pb-2">Upload Successful</h2>
<div class="section">
<label>DOWNLOAD PAGE (SHARE THIS)</label>
<input id="pageLink" readonly class="input-text">
<button onclick="copy('pageLink')">COPY</button>
</div>
<div class="section">
<label>DIRECT LINK</label>
<input id="directLink" readonly class="input-text">
<button onclick="copy('directLink')">COPY</button>
</div>
<div class="section border-t border-black pt-4">
<label style="color: #cc0000;">DELETION LINK (KEEP PRIVATE)</label>
<input id="deleteLink" readonly class="input-text" style="color: #cc0000; border-color: #cc0000;">
<button onclick="copy('deleteLink')">COPY DELETION URL</button>
</div>
<div class="mt-6">
<a href="/" class="text-xs underline font-bold">← UPLOAD ANOTHER</a>
</div>
</div>
<script>
const params = new URLSearchParams(location.search);
const id = params.get("id");
const delId = params.get("del"); // Assuming you pass delId in query string
const page = `${location.origin}/d/${id}`;
const direct = `${location.origin}/f/${id}`;
const del = `${location.origin}/api/file/${delId}`;
document.getElementById("pageLink").value = page;
document.getElementById("directLink").value = direct;
document.getElementById("deleteLink").value = delId ? del : "Contact Admin";
function copy(id) {
const el = document.getElementById(id);
el.select();
document.execCommand('copy');
}
</script>
</body>
</html>