1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/mipilin synced 2025-05-13 08:43:07 +00:00

invite cooooddeesss

Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
Rae 5e 2024-12-10 22:27:43 -05:00
parent 7b563f5c31
commit 5abe0b5fad
Signed by: rae
GPG key ID: 5B1A0FAB9BAB81EE
22 changed files with 2326 additions and 16 deletions

32
views/admin.pug Normal file
View file

@ -0,0 +1,32 @@
extends site.pug
block content
h1 Admin Panel
h2 Invite codes
form(action="/mod/codes/delete", method="post")
table
tbody
tr
th Token
th Expires
th Creator
for code of codes
- const timestamp = code.expires.getTime()
tr
td= code.token
if timestamp === 0
td.subtle never
else if Date.now() >= timestamp
td.error EXPIRED
else
td= code.expiresString
td
a(href=`/users/${code.uname}`)= code.uname
td
button(type="submit", name="token", value=code.token) Delete
form(action="/mod/codes/prune", method="post")
button(type="submit") Prune
br
form(action="/mod/codes/create", method="post")
input(type="datetime-local", name="expiration")
button(type="submit") Create