Merge pull request #555 from decafff/master

Added result options to commandline
This commit is contained in:
Jack 2020-11-10 20:29:40 +00:00 committed by GitHub
commit 310246bf5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 0 deletions

View file

@ -614,6 +614,46 @@ let commands = {
window.open("https://discord.gg/monkeytype");
},
},
{
id: "repeatTest",
display: "Repeat test",
exec: () => {
if (resultVisible) {
restartTest(true);
}
},
},
{
id: "practiceMissedWords",
display: "Practice missed words",
exec: () => {
if (resultVisible) {
if (Object.keys(missedWords).length > 0) {
initPractiseMissedWords();
} else {
showNotification("You haven't missed any words.", 2000);
}
}
},
},
{
id: "toggleWordHistory",
display: "Toggle word history",
exec: () => {
if (resultVisible) {
toggleResultWordsDisplay();
}
},
},
{
id: "saveScreenshot",
display: "Save screenshot",
exec: () => {
if (resultVisible) {
copyResultToClipboard();
}
},
},
],
};

View file

@ -433,5 +433,10 @@
"name": "iceberg_light",
"bgColor": "#e8e9ec",
"textColor": "#33374c"
},
{
"name": "onedark",
"bgColor": "#2f343f",
"textColor": "#98c379"
}
]

11
static/themes/onedark.css Normal file
View file

@ -0,0 +1,11 @@
:root {
--bg-color: #2f343f;
--caret-color: #61afef;
--main-color: #61afef;
--sub-color: #eceff4;
--text-color: #98c379;
--error-color: #e06c75;
--error-extra-color: #d62436;
--colorful-error-color: #d62436;
--colorful-error-extra-color: #ff0019;
}