1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/mipilin synced 2025-01-31 02:53:36 +00:00
mipilin/views/admin.pug
roxwize afc634b0d2
uhhh yeah
Signed-off-by: roxwize <rae@roxwize.xyz>
2024-12-25 18:44:29 -05:00

32 lines
895 B
Text

extends site.pug
block content
h1 Admin Panel
h2 Invite codes
form(action="/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="/codes/create", method="post")
input(type="datetime-local", name="expiration")
button(type="submit") Create