This commit is contained in:
mrfry 2022-03-22 18:52:30 +01:00
commit 07ea2d0dab
4 changed files with 49 additions and 46 deletions

View file

@ -195,7 +195,9 @@ function getDayName(day) {
case -2: case -2:
return 'Before yesterday' return 'Before yesterday'
default: default:
return `Day ${d.toString()}` const now = new Date()
now.setDate(now.getDate() + d);
return now.toDateString()
} }
} }
@ -266,7 +268,7 @@ function pCols(cols, rowTitles, colorNames, firstRowColor) {
slicedName = slicedName + sep slicedName = slicedName + sep
} }
let ammount = val[i].val ? val[i].val.toString() : '' let ammount = val[i].val ? val[i].val.toLocaleString() : ''
while (ammount.length < 5) { while (ammount.length < 5) {
ammount = ammount + ' ' ammount = ammount + ' '
} }
@ -446,9 +448,9 @@ try {
return [getDayName(-x)] return [getDayName(-x)]
}) })
data.forEach((dataCount, i) => { data.forEach((dataCount, i) => {
res[i].push(dataCount.userCount.toString()) res[i].push(dataCount.userCount.toLocaleString())
res[i].push(dataCount.subjectCount.toString()) res[i].push(dataCount.subjectCount.toLocaleString())
res[i].push(dataCount.questionCount.toString()) res[i].push(dataCount.questionCount.toLocaleString())
}) })
pCols(res, ['', 'Users', 'Subjects', 'Questions'], false, 'green') pCols(res, ['', 'Users', 'Subjects', 'Questions'], false, 'green')
@ -470,8 +472,8 @@ try {
} }
return [ return [
getDayName(day), getDayName(day),
countLinesMatching(log, '?install').toString(), countLinesMatching(log, '?install').toLocaleString(),
countLinesMatching(log, '?up').toString(), countLinesMatching(log, '?up').toLocaleString(),
] ]
} }

View file

@ -148,6 +148,9 @@ function setup(data: SubmoduleData): void {
socket.on('chat message', (message) => { socket.on('chat message', (message) => {
const { reciever, msg, type } = message const { reciever, msg, type } = message
if (!reciever || !msg || !type) {
return
}
const recieverUser = dbtools.Select(userDB, 'users', { const recieverUser = dbtools.Select(userDB, 'users', {
id: reciever, id: reciever,
})[0] })[0]

View file

@ -1,41 +1,39 @@
<html> <html>
<body bgcolor="#212127">
<body bgcolor="#212127">
<head> <head>
<title>FryLabs.net</title> <title>frylabs.net</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8" /> <meta name="viewport" content="width=device-width, initial-scale=0.8" />
<style> <style>
body { body {
font: normal 14px Verdana; margin: 0px;
color: #999999; height: 100%;
font: bold 0.75vw Verdana;
color: #999;
display: flex;
justify-content: center;
align-items: center;
user-select: none;
} }
td { h2 {
vertical-align: top color: #99f;
}
a {
color: #9999ff;
text-decoration: none; text-decoration: none;
} }
</style> </style>
</head> </head>
</p>
<h2> <h2>
<a> <pre> /$$$$$$$$ /$$ /$$ /$$
<pre> | $$_____/ | $$ | $$ | $$
____ __ __ | $$ /$$$$$$ /$$ /$$| $$ /$$$$$$ | $$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/ __/_____ __ / /__ _/ / ___ | $$$$$ /$$__ $$| $$ | $$| $$ |____ $$| $$__ $$ /$$_____/ | $$__ $$ /$$__ $$|_ $$_/
/ _// __/ // / / / _ `/ _ \(_-< | $$__/| $$ \__/| $$ | $$| $$ /$$$$$$$| $$ \ $$| $$$$$$ | $$ \ $$| $$$$$$$$ | $$
/_/ /_/ \_, / /_/\_,_/_.__/___/ | $$ | $$ | $$ | $$| $$ /$$__ $$| $$ | $$ \____ $$ | $$ | $$| $$_____/ | $$ /$$
/___/ | $$ | $$ | $$$$$$$| $$| $$$$$$$| $$$$$$$/ /$$$$$$$//$$| $$ | $$| $$$$$$$ | $$$$/
</pre> |__/ |__/ \____ $$|__/ \_______/|_______/ |_______/|__/|__/ |__/ \_______/ \___/
</a> /$$ | $$
| $$$$$$/
\______/</pre>
</h2> </h2>
</body> </body>
</html> </html>

@ -1 +1 @@
Subproject commit 8e4e24bed641960f75156301f29ad6fc29d9c754 Subproject commit 4f82b9d8c9c32ebbd9d73b951fc1db26ad1ceb22