mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-18 03:26:07 +08:00
Disabled time typing requirement on dev (#3169)
* checking if mode is dev when adding to daily lb * disabled time typing check on dev when recalculating leaderboards * not replacing footer on localhost * using ternary * modified logic
This commit is contained in:
parent
6668575cea
commit
ae300bfa94
3 changed files with 8 additions and 3 deletions
|
@ -327,7 +327,7 @@ export async function addResult(
|
|||
(funbox === "none" || funbox === "plus_one" || funbox === "plus_two") &&
|
||||
!bailedOut &&
|
||||
!user.banned &&
|
||||
(user.timeTyping ?? 0) > 7200;
|
||||
(process.env.MODE === "dev" || (user.timeTyping ?? 0) > 7200);
|
||||
|
||||
if (dailyLeaderboard && validResultCriteria) {
|
||||
incrementDailyLeaderboard(result.mode, result.mode2, result.language);
|
||||
|
|
|
@ -78,7 +78,9 @@ export async function update(
|
|||
$exists: true,
|
||||
},
|
||||
banned: { $exists: false },
|
||||
timeTyping: { $gt: 7200 },
|
||||
timeTyping: {
|
||||
$gt: process.env.MODE === "dev" ? 0 : 7200,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -133,7 +133,10 @@ function updateFooter(lb: LbKey): void {
|
|||
return;
|
||||
}
|
||||
|
||||
if ((DB.getSnapshot().globalStats?.time ?? 0) < 7200) {
|
||||
if (
|
||||
window.location.hostname !== "localhost" &&
|
||||
(DB.getSnapshot().globalStats?.time ?? 0) < 7200
|
||||
) {
|
||||
$(`#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.</>
|
||||
|
|
Loading…
Add table
Reference in a new issue