Add 404 page, add Deleted page, fix errors
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Filename</th>
|
||||
<th>Size</th>
|
||||
<th>Created</th>
|
||||
<th>Expires</th>
|
||||
<th>Hits</th>
|
||||
@@ -53,6 +54,7 @@
|
||||
<td class="font-mono">
|
||||
<a href="/admin/download/{{.ID}}" target="_blank">{{.Filename}}</a>
|
||||
</td>
|
||||
<td>{{humanSize .Size}}</td>
|
||||
<td>{{.CreatedAt.Format "Jan 02, 2006 15:04"}}</td>
|
||||
<td>{{.ExpiresAt.Format "Jan 02, 2006 15:04"}}</td>
|
||||
<td>{{.DownloadCount}}</td>
|
||||
@@ -72,10 +74,13 @@
|
||||
</td>
|
||||
<td>
|
||||
{{if not .Deleted}}
|
||||
<form action="/admin/delete/{{.ID}}" method="POST" onsubmit="return confirm('Kill this file?')">
|
||||
<form action="/admin/delete/{{.ID}}" method="GET" onsubmit="return confirm('Kill this file?')">
|
||||
<button type="submit">TERMINATE</button>
|
||||
</form>
|
||||
{{end}}
|
||||
<form action="/admin/delete/fr/{{.ID}}" method="GET" onsubmit="return confirm('Kill this file and the record?')">
|
||||
<button type="submit">TERMINATE RECORD</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
||||
92
templates/deleted.html
Normal file
92
templates/deleted.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>File Deleted sucessfull</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: 3px solid #000;
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
.title {
|
||||
font-size: 28px;
|
||||
font-weight: 900;
|
||||
border-bottom: 3px solid #000;
|
||||
padding-bottom: 6px;
|
||||
margin-bottom: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.button {
|
||||
border: 2px solid #000;
|
||||
background: #eee;
|
||||
padding: 6px 12px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
.button:hover {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
.ascii {
|
||||
font-family: monospace;
|
||||
font-size: 11px;
|
||||
border: 2px dashed #000;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-h-screen flex items-center justify-center p-4">
|
||||
|
||||
<div class="w-full max-w-[520px]">
|
||||
|
||||
<div class="box text-center">
|
||||
|
||||
<div class="title">
|
||||
FILE DELETED SUCESSFULL
|
||||
</div>
|
||||
|
||||
<div class="subtitle">
|
||||
The file has been absolutely obliterated.
|
||||
</div>
|
||||
|
||||
<!-- <div class="ascii">-->
|
||||
<!-- [ OK ] locating file...-->
|
||||
<!-- [ OK ] emotionally detaching...-->
|
||||
<!-- [ OK ] pressing the big red button...-->
|
||||
<!-- [ OK ] file screaming detected...-->
|
||||
<!-- [ OK ] scream ignored...-->
|
||||
<!-- [ OK ] file is now gone forever™-->
|
||||
|
||||
<!-- (there is no undo)-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="text-xs font-bold uppercase mb-4">-->
|
||||
<!-- Congratulations. The electrons have been freed.-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<a href="/" class="button w-full">Pretend Nothing Happened</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
97
templates/error.html
Normal file
97
templates/error.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Nothing to see here</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;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button {
|
||||
border: 2px solid #000;
|
||||
background: #eee;
|
||||
padding: 4px 12px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
.button:active {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 28px;
|
||||
font-weight: 900;
|
||||
border-bottom: 2px solid #000;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-h-screen flex items-center justify-center p-4">
|
||||
|
||||
<div class="w-full max-w-[493px] flex flex-col items-center">
|
||||
|
||||
<div class="box text-center">
|
||||
|
||||
<div class="title">
|
||||
NOTHING TO SEE HERE
|
||||
</div>
|
||||
|
||||
<div class="subtitle">
|
||||
MOVE ALONG
|
||||
</div>
|
||||
|
||||
<div class="text">
|
||||
This page is empty,<br>
|
||||
unavailable, private,<br>
|
||||
or intentionally left blank.
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<a href="/" class="button w-full">GO BACK</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
88
templates/fileNotFound.html
Normal file
88
templates/fileNotFound.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>404 — File Not Found</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;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
button, .button {
|
||||
border: 2px solid #000;
|
||||
background: #eee;
|
||||
padding: 4px 12px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button:hover, .button:hover {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
button:active, .button:active {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.error-code {
|
||||
font-size: 64px;
|
||||
font-weight: 900;
|
||||
border-bottom: 2px solid #000;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.error-text {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-h-screen flex items-center justify-center p-4">
|
||||
|
||||
<div class="w-full max-w-[493px] flex flex-col items-center">
|
||||
|
||||
<div class="box text-center">
|
||||
|
||||
<div class="error-code">404</div>
|
||||
|
||||
<div class="error-text mb-4">
|
||||
FILE NOT FOUND 💀
|
||||
</div>
|
||||
|
||||
<div class="text-xs mb-6 uppercase">
|
||||
The requested file does not exist,<br>
|
||||
has expired, or was destroyed,<br>or my db is fucked.
|
||||
We'll never know :D
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<a href="/" class="button w-full">RETURN TO UPLOADER</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -335,6 +335,6 @@
|
||||
document.execCommand('copy');
|
||||
}
|
||||
</script>
|
||||
<a href="/login" class="fixed bottom-1 right-1 text-[10px] underline">SUDO</a>
|
||||
<a href="/admin" class="fixed bottom-1 right-1 text-[10px] underline">SUDO</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user