2024-12-11 03:27:43 +00:00
|
|
|
extends site.pug
|
|
|
|
|
|
|
|
block content
|
|
|
|
h1 Admin Panel
|
|
|
|
h2 Invite codes
|
2024-12-25 23:44:29 +00:00
|
|
|
form(action="/codes/delete", method="post")
|
2024-12-11 03:27:43 +00:00
|
|
|
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
|
2024-12-25 23:44:29 +00:00
|
|
|
form(action="/codes/create", method="post")
|
2024-12-11 03:27:43 +00:00
|
|
|
input(type="datetime-local", name="expiration")
|
|
|
|
button(type="submit") Create
|