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

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