189 lines
5.7 KiB
HTML
189 lines
5.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Send.it - File Ready</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
|
|
<style>
|
|
* {
|
|
border-radius: 0 !important;
|
|
transition: none !important;
|
|
}
|
|
|
|
body {
|
|
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
|
|
background: #fff;
|
|
color: #000;
|
|
}
|
|
|
|
.box {
|
|
border: 3px solid #000;
|
|
background: #fff;
|
|
width: 100%;
|
|
}
|
|
|
|
.input-text {
|
|
border: 2px solid #000;
|
|
padding: 6px 10px;
|
|
background: #fff;
|
|
width: 100%;
|
|
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
button {
|
|
border: 2px solid #000;
|
|
background: #fff;
|
|
padding: 6px 14px;
|
|
font-weight: 900;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
text-transform: uppercase;
|
|
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
|
|
box-shadow: 3px 3px 0px #000;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
button:hover {
|
|
background: #000;
|
|
color: #fff;
|
|
box-shadow: none;
|
|
transform: translate(2px, 2px);
|
|
}
|
|
|
|
button:active {
|
|
background: #ffff00;
|
|
color: #000;
|
|
}
|
|
|
|
.section-label {
|
|
font-size: 11px;
|
|
font-weight: 900;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.nav-link {
|
|
font-weight: 900;
|
|
text-decoration: underline;
|
|
text-transform: uppercase;
|
|
font-size: 11px;
|
|
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
background: #000;
|
|
color: #fff;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="min-h-screen flex flex-col items-center justify-center p-4">
|
|
|
|
<div class="w-full max-w-[520px] flex flex-col items-center">
|
|
|
|
<!-- Header -->
|
|
<header class="w-full mb-0 border-b-8 border-black pb-3 flex justify-between items-end">
|
|
<div>
|
|
<img src="/static/logo.png" alt="Send.it logo" style="height:36px;" class="mb-1">
|
|
<h1 class="text-3xl font-black uppercase tracking-tighter leading-none">Send_It</h1>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Main Box -->
|
|
<div class="box">
|
|
<div class="p-5 space-y-4">
|
|
|
|
<!-- Status Banner -->
|
|
<div class="border-2 border-black p-3" style="background:#00ff00;">
|
|
<span class="font-black text-sm uppercase">✓ File_Uploaded</span>
|
|
</div>
|
|
|
|
<!-- Download Link -->
|
|
<div>
|
|
<div class="section-label mb-1">Download_Link:</div>
|
|
<div class="flex">
|
|
<input id="res-url" readonly class="input-text">
|
|
<button onclick="copy('res-url')" class="border-l-0 pl-1 pr-1">COPY</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Delete Link -->
|
|
<div>
|
|
<div class="section-label mb-1 text-red-600">Deletion_Link <span class="text-gray-400 normal-case">(private)</span>:</div>
|
|
<div class="flex">
|
|
<input id="res-del" readonly class="input-text" style="color:#cc0000;">
|
|
<button onclick="copy('res-del')" class="border-l-0 pl-1 pr-1">COPY</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<button id="qr-btn" onclick="toggleQR()" class="pl-1 pr-1">Show_QR</button>
|
|
|
|
<div id="qr-container" class="mt-3 hidden border-2 border-black p-4 flex justify-center">
|
|
<div id="qr-code"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Actions -->
|
|
<div class="border-t-2 border-black pt-4">
|
|
<a href="/" class="nav-link">← New_Upload</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="w-full mt-3 flex justify-between items-center">
|
|
<span class="text-[10px] font-black text-gray-400">{{ .MODT }}</span>
|
|
<div class="flex gap-4">
|
|
<a href="/static/TOS.txt" class="nav-link">TOS</a>
|
|
<a href="/admin" class="nav-link">SUDO</a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
function copy(id) {
|
|
const el = document.getElementById(id);
|
|
el.select();
|
|
el.setSelectionRange(0, 99999);
|
|
document.execCommand('copy');
|
|
}
|
|
|
|
const downloadKey = "{{.DownloadID}}";
|
|
const deleteKey = "{{.DeleteID}}";
|
|
const base = window.location.origin;
|
|
|
|
document.getElementById("res-url").value = `${base}/api/files/view/${downloadKey}`;
|
|
document.getElementById("res-del").value = `${base}/api/files/delete/${deleteKey}`;
|
|
|
|
const downloadURL = `${base}/api/files/view/${downloadKey}`;
|
|
|
|
// Generate QR code
|
|
new QRCode(document.getElementById("qr-code"), {
|
|
text: downloadURL,
|
|
width: 160,
|
|
height: 160
|
|
});
|
|
|
|
function toggleQR() {
|
|
const container = document.getElementById("qr-container");
|
|
const btn = document.getElementById("qr-btn");
|
|
|
|
const isHidden = container.classList.contains("hidden");
|
|
|
|
container.classList.toggle("hidden");
|
|
btn.textContent = isHidden ? "Hide_QR" : "Show_QR";
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |