From 0797327f1dee58ccddf4bb2fc893c6ac1cfd6b17 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 20 Aug 2021 12:09:03 +0100 Subject: [PATCH 1/2] added german dvorak --- src/js/layouts.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/js/layouts.js b/src/js/layouts.js index 23b5c4e5a..fd68d20d2 100644 --- a/src/js/layouts.js +++ b/src/js/layouts.js @@ -183,6 +183,16 @@ const layouts = { " " ], }, + german_dvorak: { + keymapShowTopRow: true, + keys: [ + "^°", "1!", "2", "3§", "4$", "5%", "6&", "7/", "8(", "9)", "0=", "+*", "<>", + "üÜ", ",;", ".:", "pP", "yY", "fF", "gG", "cC", "tT", "pP", "zZ", "ß?", "´`", + "aA", "oO", "eE", "iI", "uU", "hH", "dD", "rR", "nN", "sS", "lL", "-_", + "äÄ", "öÖ", "qQ", "jJ", "kK", "xX", "bB", "mM", "wW", "vV", "#'", + " " + ] + }, dvorak_L: { keymapShowTopRow: true, keys: [ From 6e3e2d736d8cb067808eff68987b5c4e7aebc46a Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 20 Aug 2021 22:42:43 +0100 Subject: [PATCH 2/2] parsefloat --- backend/api/controllers/result.js | 1 + src/js/account.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/api/controllers/result.js b/backend/api/controllers/result.js index 0b863c224..e6c4bd371 100644 --- a/backend/api/controllers/result.js +++ b/backend/api/controllers/result.js @@ -43,6 +43,7 @@ class ResultController { try { const { uid } = req.decodedToken; const { result } = req.body; + result.testDuration = parseFloat(result.testDuration); if (validateObjectValues(result) > 0) return res.status(400).json({ message: "Bad input" }); if ( diff --git a/src/js/account.js b/src/js/account.js index 0223aad81..025041ded 100644 --- a/src/js/account.js +++ b/src/js/account.js @@ -620,7 +620,7 @@ export function update() { tt = (parseFloat(result.mode2) / parseFloat(result.wpm)) * 60; } } else { - tt = result.testDuration; + tt = parseFloat(result.testDuration); } tt += (result.incompleteTestSeconds ?? 0) - (result.afkDuration ?? 0);