mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.4 KiB
49 lines
1.4 KiB
include ./post.pug
|
|
mixin ban(ban, banpage)
|
|
tr
|
|
td
|
|
if !banpage || (ban.appeal == null && ban.allowAppeal === true)
|
|
input.post-check(type='checkbox', name='checkedbans' value=ban._id)
|
|
td
|
|
if ban.board
|
|
a(href=`/${ban.board}/`) /#{ban.board}/
|
|
else
|
|
| Global
|
|
td= ban.reason
|
|
- const ip = viewRawIp === true ? ban.ip.raw : ban.ip.cloak;
|
|
if viewRawIp === true
|
|
td #{ip}
|
|
else
|
|
td #{ip}#{'.*'.repeat(ban.range)}
|
|
td #{ban.type === 0 ? 'IP' : ban.type === 1 ? 'Bypass' : 'Pruned IP'}
|
|
td #{ban.range === 0 ? 'Single' : ban.range === 1 ? 'Narrow' : 'Wide'}
|
|
td #{(!banpage || ban.showUser === true) ? ban.issuer : 'Hidden User'}
|
|
- const banDate = new Date(ban.date);
|
|
td: time.right.reltime(datetime=banDate.toISOString()) #{banDate.toLocaleString(undefined, {hourCycle:'h23'})}
|
|
- const expireDate = new Date(ban.expireAt);
|
|
td: time.right.reltime(datetime=expireDate.toISOString()) #{expireDate.toLocaleString(undefined, {hourCycle:'h23'})}
|
|
td.banposts
|
|
if ban.posts && ban.posts.length > 0
|
|
| Hover to view
|
|
.thread
|
|
each p in ban.posts
|
|
+post(p, false, false, false, true)
|
|
else
|
|
Posts not shown
|
|
td
|
|
if ban.seen
|
|
| ✓
|
|
else
|
|
| ⨯
|
|
td
|
|
if ban.allowAppeal && !ban.appeal
|
|
| ✓
|
|
else
|
|
| ⨯
|
|
td
|
|
if ban.appeal
|
|
textarea(rows=1 disabled='true') #{ban.appeal}
|
|
else if ban.allowAppeal
|
|
| No appeal submitted
|
|
else
|
|
| -
|
|
|