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

54 lines
1.5 KiB
Text
Raw Normal View History

extends site.pug
include _util.pug
block content
h1 Admin Panel
p Don't Be Evil
h2 Users
p
| Selected:
strong#user-selected [none]
table#users
tbody
tr
th UID
th Name
th Status
for user of userTable
tr
td!= user.id.toString()
td
a(href=`/users/${user.uname}`)= user.uname
td= user.status.toString(2).padStart(4, "0")
br
form(action="#", method="post", data-url="/users/{}/edit?param=status&status=4")
button#btn-trust Trust
button#btn-ban Ban
form(action="#", method="post", data-url="/users/{}/edit?param=status&status=0")
button#btn-reset Revoke all stati
h2(style="margin-top:1em;") Invite codes
p Well Rae. You've made quite a The Closed Beta.
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
+invite_code_expiration(code)
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
script(src="/js/admin.js", nonce=nonce)