This commit is contained in:
115
public/index.html
Normal file
115
public/index.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Send • Upload</title>
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: light;
|
||||
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||
background: #f6f7fb;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: radial-gradient(circle at top, #ffffff, #eef1f7);
|
||||
}
|
||||
.card {
|
||||
background: #fff;
|
||||
padding: 2.5rem;
|
||||
border-radius: 1.25rem;
|
||||
box-shadow: 0 20px 60px rgba(10, 31, 68, 0.12);
|
||||
width: min(420px, 90vw);
|
||||
}
|
||||
h1 {
|
||||
margin-top: 0;
|
||||
font-size: 1.75rem;
|
||||
color: #0f172a;
|
||||
}
|
||||
p.description {
|
||||
color: #4b5563;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
input[type='file'] {
|
||||
border: 1px dashed #94a3b8;
|
||||
padding: 1rem;
|
||||
border-radius: 0.75rem;
|
||||
background: #f8fafc;
|
||||
}
|
||||
button {
|
||||
padding: 0.85rem 1.2rem;
|
||||
border: none;
|
||||
background: #2563eb;
|
||||
color: #fff;
|
||||
border-radius: 0.75rem;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: background 160ms ease;
|
||||
}
|
||||
button:hover {
|
||||
background: #1e3a8a;
|
||||
}
|
||||
.status {
|
||||
margin-top: 1rem;
|
||||
padding: 0.85rem 1rem;
|
||||
border-radius: 0.75rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.status.ok {
|
||||
background: #ecfdf5;
|
||||
color: #065f46;
|
||||
}
|
||||
.status.error {
|
||||
background: #fef2f2;
|
||||
color: #991b1b;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main class="card">
|
||||
<h1>Send a file</h1>
|
||||
<p class="description">
|
||||
Upload any file up to <strong>10 GB</strong>. The file will be stored on our
|
||||
secure cluster; only admins can access the download link.
|
||||
</p>
|
||||
<form action="/admin.php?action=upload" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="redirect_to" value="/" />
|
||||
<label>
|
||||
<input type="file" name="upload" required />
|
||||
</label>
|
||||
<button type="submit">Upload</button>
|
||||
</form>
|
||||
<div class="status" id="status" role="status"></div>
|
||||
</main>
|
||||
<script>
|
||||
(function () {
|
||||
var box = document.getElementById('status');
|
||||
if (!box) return;
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
var status = params.get('status');
|
||||
if (!status) {
|
||||
box.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
var messages = {
|
||||
success: 'Upload received. An administrator will finalize the share link.',
|
||||
error: 'Upload failed. Please try again.',
|
||||
toolarge: 'File rejected: exceeds the 10 GB limit.',
|
||||
missing: 'No file was attached. Please choose a file first.'
|
||||
};
|
||||
box.textContent = messages[status] || 'Upload processed.';
|
||||
box.classList.add(status === 'success' ? 'ok' : 'error');
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user