mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-17 11:06:17 +08:00
Merge branch 'master' into repeat-caret-pace
This commit is contained in:
commit
3e9927a95d
11 changed files with 107 additions and 38 deletions
|
@ -34,7 +34,7 @@ On the [monkeytype Discord server](https://www.discord.gg/monkeytype), we added
|
|||
|
||||
# Bug report or Feature request
|
||||
|
||||
If you encounter a bug, or have a feature request - [send me a message on Reddit](https://reddit.com/user/miodec), [create an issue](https://github.com/Miodec/monkeytype/issues), [create a discussion thread](https://github.com/Miodec/monkeytype/discussions), or [join the Discord server](https://www.discord.gg/monkeytype).
|
||||
If you encounter a bug, or have a feature request [send me a message on Reddit](https://reddit.com/user/miodec), [create an issue](https://github.com/Miodec/monkeytype/issues), [create a discussion thread](https://github.com/Miodec/monkeytype/discussions), or [join the Discord server](https://www.discord.gg/monkeytype).
|
||||
|
||||
# Contribute
|
||||
|
||||
|
|
13
package-lock.json
generated
13
package-lock.json
generated
|
@ -13,6 +13,7 @@
|
|||
"chart.js": "^2.9.4",
|
||||
"chartjs-plugin-annotation": "^0.5.7",
|
||||
"chartjs-plugin-trendline": "^0.2.2",
|
||||
"howler": "^2.2.1",
|
||||
"tinycolor2": "^1.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -2300,6 +2301,7 @@
|
|||
"dependencies": {
|
||||
"anymatch": "~3.1.1",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.3.1",
|
||||
"glob-parent": "~5.1.0",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
|
@ -4737,6 +4739,7 @@
|
|||
"anymatch": "^2.0.0",
|
||||
"async-each": "^1.0.1",
|
||||
"braces": "^2.3.2",
|
||||
"fsevents": "^1.2.7",
|
||||
"glob-parent": "^3.1.0",
|
||||
"inherits": "^2.0.3",
|
||||
"is-binary-path": "^1.0.0",
|
||||
|
@ -5496,6 +5499,11 @@
|
|||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/howler": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/howler/-/howler-2.2.1.tgz",
|
||||
"integrity": "sha512-0iIXvuBO/81CcrQ/HSSweYmbT50fT2mIc9XMFb+kxIfk2pW/iKzDbX1n3fZmDXMEIpYvyyfrB+gXwPYSDqUxIQ=="
|
||||
},
|
||||
"node_modules/htmlescape": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
|
||||
|
@ -15703,6 +15711,11 @@
|
|||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
|
||||
"dev": true
|
||||
},
|
||||
"howler": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/howler/-/howler-2.2.1.tgz",
|
||||
"integrity": "sha512-0iIXvuBO/81CcrQ/HSSweYmbT50fT2mIc9XMFb+kxIfk2pW/iKzDbX1n3fZmDXMEIpYvyyfrB+gXwPYSDqUxIQ=="
|
||||
},
|
||||
"htmlescape": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
"chart.js": "^2.9.4",
|
||||
"chartjs-plugin-annotation": "^0.5.7",
|
||||
"chartjs-plugin-trendline": "^0.2.2",
|
||||
"howler": "^2.2.1",
|
||||
"tinycolor2": "^1.4.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,6 +235,16 @@ const layouts = {
|
|||
" "
|
||||
]
|
||||
},
|
||||
handsdown: {
|
||||
keymapShowTopRow: false,
|
||||
keys: [
|
||||
"`~", "1!", "2@", "3#", "4$", "5%", "6^", "7&", "8*", "9(", "0)", "-_", "=+",
|
||||
"qQ", "cC", "hH", "pP", "vV", "kK", "yY", "oO", "jJ", "/?", "[{", "]}", "\\|",
|
||||
"rR", "sS", "nN", "tT", "gG", "wW", "uU", "eE", "iI", "aA", ";:",
|
||||
"\\|", "xX", "mM", "lL", "dD", "bB", "zZ", "fF", "'\"", ",<", ".>",
|
||||
" "
|
||||
]
|
||||
},
|
||||
handsdown_alt: {
|
||||
keymapShowTopRow: false,
|
||||
keys: [
|
||||
|
|
|
@ -132,6 +132,8 @@ function loadOldReplay() {
|
|||
startingIndex = i + 1;
|
||||
}
|
||||
});
|
||||
const time = Math.floor(replayData[startingIndex].time / 1000);
|
||||
$("#replayStopwatch").text(time + "s");
|
||||
return startingIndex;
|
||||
}
|
||||
|
||||
|
@ -170,6 +172,7 @@ function startReplayRecording() {
|
|||
//hide replay display if user left it open
|
||||
toggleReplayDisplay();
|
||||
}
|
||||
$("#replayStopwatch").text(0 + "s");
|
||||
replayData = [];
|
||||
replayStartTime = performance.now();
|
||||
replayRecording = true;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Config from "./config";
|
||||
import {Howl, Howler} from 'howler';
|
||||
|
||||
let errorSound = new Audio("../sound/error.wav");
|
||||
let errorSound = new Howl({src:["../sound/error.wav"]});
|
||||
let clickSounds = null;
|
||||
|
||||
export function init() {
|
||||
|
@ -9,22 +10,22 @@ export function init() {
|
|||
1: [
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click1/click1_1.wav"),
|
||||
new Audio("../sound/click1/click1_1.wav"),
|
||||
new Howl({src:"../sound/click1/click1_1.wav"}),
|
||||
new Howl({src:"../sound/click1/click1_1.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click1/click1_2.wav"),
|
||||
new Audio("../sound/click1/click1_2.wav"),
|
||||
new Howl({src:"../sound/click1/click1_2.wav"}),
|
||||
new Howl({src:"../sound/click1/click1_2.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click1/click1_3.wav"),
|
||||
new Audio("../sound/click1/click1_3.wav"),
|
||||
new Howl({src:"../sound/click1/click1_3.wav"}),
|
||||
new Howl({src:"../sound/click1/click1_3.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
|
@ -32,22 +33,22 @@ export function init() {
|
|||
2: [
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click2/click2_1.wav"),
|
||||
new Audio("../sound/click2/click2_1.wav"),
|
||||
new Howl({src:"../sound/click2/click2_1.wav"}),
|
||||
new Howl({src:"../sound/click2/click2_1.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click2/click2_2.wav"),
|
||||
new Audio("../sound/click2/click2_2.wav"),
|
||||
new Howl({src:"../sound/click2/click2_2.wav"}),
|
||||
new Howl({src:"../sound/click2/click2_2.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click2/click2_3.wav"),
|
||||
new Audio("../sound/click2/click2_3.wav"),
|
||||
new Howl({src:"../sound/click2/click2_3.wav"}),
|
||||
new Howl({src:"../sound/click2/click2_3.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
|
@ -55,22 +56,22 @@ export function init() {
|
|||
3: [
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click3/click3_1.wav"),
|
||||
new Audio("../sound/click3/click3_1.wav"),
|
||||
new Howl({src:"../sound/click3/click3_1.wav"}),
|
||||
new Howl({src:"../sound/click3/click3_1.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click3/click3_2.wav"),
|
||||
new Audio("../sound/click3/click3_2.wav"),
|
||||
new Howl({src:"../sound/click3/click3_2.wav"}),
|
||||
new Howl({src:"../sound/click3/click3_2.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click3/click3_3.wav"),
|
||||
new Audio("../sound/click3/click3_3.wav"),
|
||||
new Howl({src:"../sound/click3/click3_3.wav"}),
|
||||
new Howl({src:"../sound/click3/click3_3.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
|
@ -78,43 +79,43 @@ export function init() {
|
|||
4: [
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click4/click4_1.wav"),
|
||||
new Audio("../sound/click4/click4_11.wav"),
|
||||
new Howl({src:"../sound/click4/click4_1.wav"}),
|
||||
new Howl({src:"../sound/click4/click4_11.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click4/click4_2.wav"),
|
||||
new Audio("../sound/click4/click4_22.wav"),
|
||||
new Howl({src:"../sound/click4/click4_2.wav"}),
|
||||
new Howl({src:"../sound/click4/click4_22.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click4/click4_3.wav"),
|
||||
new Audio("../sound/click4/click4_33.wav"),
|
||||
new Howl({src:"../sound/click4/click4_3.wav"}),
|
||||
new Howl({src:"../sound/click4/click4_33.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click4/click4_4.wav"),
|
||||
new Audio("../sound/click4/click4_44.wav"),
|
||||
new Howl({src:"../sound/click4/click4_4.wav"}),
|
||||
new Howl({src:"../sound/click4/click4_44.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click4/click4_5.wav"),
|
||||
new Audio("../sound/click4/click4_55.wav"),
|
||||
new Howl({src:"../sound/click4/click4_5.wav"}),
|
||||
new Howl({src:"../sound/click4/click4_55.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
{
|
||||
sounds: [
|
||||
new Audio("../sound/click4/click4_6.wav"),
|
||||
new Audio("../sound/click4/click4_66.wav"),
|
||||
new Howl({src:"../sound/click4/click4_6.wav"}),
|
||||
new Howl({src:"../sound/click4/click4_66.wav"}),
|
||||
],
|
||||
counter: 0,
|
||||
},
|
||||
|
@ -132,12 +133,12 @@ export function playClick() {
|
|||
let randomSound = clickSounds[Config.playSoundOnClick][rand];
|
||||
randomSound.counter++;
|
||||
if (randomSound.counter === 2) randomSound.counter = 0;
|
||||
randomSound.sounds[randomSound.counter].currentTime = 0;
|
||||
randomSound.sounds[randomSound.counter].seek(0);
|
||||
randomSound.sounds[randomSound.counter].play();
|
||||
}
|
||||
|
||||
export function playError() {
|
||||
if (!Config.playSoundOnError) return;
|
||||
errorSound.currentTime = 0;
|
||||
errorSound.seek(0);
|
||||
errorSound.play();
|
||||
}
|
||||
|
|
|
@ -185,6 +185,7 @@ export function colorful(tc) {
|
|||
}
|
||||
|
||||
export function screenshot() {
|
||||
let revealReplay = false;
|
||||
function revertScreenshot() {
|
||||
$("#notificationCenter").removeClass("hidden");
|
||||
$("#commandLineMobileButton").removeClass("hidden");
|
||||
|
@ -194,8 +195,8 @@ export function screenshot() {
|
|||
if (firebase.auth().currentUser == null)
|
||||
$(".pageTest .loginTip").removeClass("hidden");
|
||||
}
|
||||
let revealReplay = false;
|
||||
if (!$("#resultReplay").hasClass("hidden")) {
|
||||
|
||||
if (!$("#resultReplay").hasClass('hidden')) {
|
||||
revealReplay = true;
|
||||
Replay.pauseReplay();
|
||||
}
|
||||
|
|
|
@ -3748,12 +3748,12 @@
|
|||
</div>
|
||||
<div class="button signIn">
|
||||
<i class="fas fa-sign-in-alt"></i>
|
||||
Sign In
|
||||
Sign in with email
|
||||
</div>
|
||||
<div style="font-size: 0.75rem; text-align: center">or</div>
|
||||
<div class="button signInWithGoogle">
|
||||
<i class="fab fa-google"></i>
|
||||
Google Sign In
|
||||
Sign in with Google
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -543,5 +543,15 @@
|
|||
"name": "midnight",
|
||||
"bgColor": "#0c0e12",
|
||||
"textColor": "#525f7a"
|
||||
},
|
||||
{
|
||||
"name": "blueberry_light",
|
||||
"bgColor": "#dae0f5",
|
||||
"textColor": "#df4576"
|
||||
},
|
||||
{
|
||||
"name": "blueberry_dark",
|
||||
"bgColor": "#212b42",
|
||||
"textColor": "#df4576"
|
||||
}
|
||||
]
|
||||
|
|
15
static/themes/blueberry_dark.css
Normal file
15
static/themes/blueberry_dark.css
Normal file
|
@ -0,0 +1,15 @@
|
|||
:root {
|
||||
--bg-color: #212b42;
|
||||
--main-color: #add7ff;
|
||||
--caret-color: #962f7e;
|
||||
--sub-color: #5c7da5;
|
||||
--text-color: #91b4d5;
|
||||
--error-color: #df4576;
|
||||
--error-extra-color: #d996ac;
|
||||
--colorful-error-color: #df4576;
|
||||
--colorful-error-extra-color: #d996ac;
|
||||
}
|
||||
|
||||
#top .logo .bottom {
|
||||
color: #962f7e;
|
||||
}
|
15
static/themes/blueberry_light.css
Normal file
15
static/themes/blueberry_light.css
Normal file
|
@ -0,0 +1,15 @@
|
|||
:root {
|
||||
--bg-color: #dae0f5;
|
||||
--main-color: #506477;
|
||||
--caret-color: #df4576;
|
||||
--sub-color: #92a4be;
|
||||
--text-color: #678198;
|
||||
--error-color: #df4576;
|
||||
--error-extra-color: #d996ac;
|
||||
--colorful-error-color: #df4576;
|
||||
--colorful-error-extra-color: #d996ac;
|
||||
}
|
||||
|
||||
#top .logo .bottom {
|
||||
color: #df4576;
|
||||
}
|
Loading…
Add table
Reference in a new issue