2 hours minimum to be placed on the lb

This commit is contained in:
Miodec 2022-05-21 01:32:09 +02:00
parent 12b4b899a5
commit 42d984981a
2 changed files with 21 additions and 4 deletions

View file

@ -78,7 +78,7 @@ export async function update(
$exists: true,
},
banned: { $exists: false },
timeTyping: { $gt: 3600 },
timeTyping: { $gt: 7200 },
},
},
{

View file

@ -107,11 +107,28 @@ function updateFooter(lb: LbKey): void {
} else {
side = "right";
}
if (!Auth.currentUser) {
$(`#leaderboardsWrapper table.${side} tfoot`).html(`
<tr>
<td colspan="6" style="text-align:center;"></>
</tr>
`);
return;
}
if (DB.getSnapshot().globalStats?.time ?? 0 < 3600) {
$(`#leaderboardsWrapper table.${side} tfoot`).html(`
<tr>
<td colspan="6" style="text-align:center;">Your account must have 2 hours typed to be placed on the leaderboard.</>
</tr>
`);
return;
}
$(`#leaderboardsWrapper table.${side} tfoot`).html(`
<tr>
<td><br><br></td>
<td colspan="4" style="text-align:center;">Not qualified</>
<td><br><br></td>
<td colspan="6" style="text-align:center;">Not qualified</>
</tr>
`);