mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 13:11:19 +08:00
commit
581af5b0aa
13 changed files with 24200 additions and 55 deletions
3644
functions/package-lock.json
generated
3644
functions/package-lock.json
generated
File diff suppressed because it is too large
Load diff
10519
package-lock.json
generated
10519
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1831,9 +1831,7 @@ export let defaultCommands = {
|
|||
{
|
||||
id: "bailOutNo",
|
||||
display: "Nevermind",
|
||||
exec: () => {
|
||||
Commandline.hide();
|
||||
},
|
||||
exec: () => {},
|
||||
available: () => {
|
||||
return canBailOut();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function showInput(command, placeholder, defaultValue = "") {
|
|||
$("#commandInput input").focus();
|
||||
$("#commandInput input").attr("command", "");
|
||||
$("#commandInput input").attr("command", command);
|
||||
if (defaultValue != ""){
|
||||
if (defaultValue != "") {
|
||||
$("#commandInput input").select();
|
||||
}
|
||||
}
|
||||
|
|
@ -46,10 +46,13 @@ function showFound() {
|
|||
try {
|
||||
$.each(list.list, (index, obj) => {
|
||||
if (obj.found) {
|
||||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
if (
|
||||
(!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme") &&
|
||||
!ThemeController.randomTheme
|
||||
)
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id))
|
||||
Config.previewFontFamily(Config.fontFamily);
|
||||
UpdateConfig.previewFontFamily(Config.fontFamily);
|
||||
obj.hover();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -118,7 +121,9 @@ function updateSuggested() {
|
|||
function hide() {
|
||||
UpdateConfig.previewFontFamily(Config.fontFamily);
|
||||
// applyCustomThemeColors();
|
||||
ThemeController.clearPreview();
|
||||
if (!ThemeController.randomTheme) {
|
||||
ThemeController.clearPreview();
|
||||
}
|
||||
$("#commandLineWrapper")
|
||||
.stop(true, true)
|
||||
.css("opacity", 1)
|
||||
|
|
@ -367,7 +372,8 @@ $("#commandLineWrapper #commandLine .suggestions").on("mouseover", (e) => {
|
|||
if (obj.id == hoverId) {
|
||||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id)) Config.previewFontFamily(Config.fontFamily);
|
||||
if (!/font/gi.test(obj.id))
|
||||
UpdateConfig.previewFontFamily(Config.fontFamily);
|
||||
obj.hover();
|
||||
}
|
||||
});
|
||||
|
|
@ -489,7 +495,7 @@ $(document).keydown((e) => {
|
|||
if (!/theme/gi.test(obj.id) || obj.id === "toggleCustomTheme")
|
||||
ThemeController.clearPreview();
|
||||
if (!/font/gi.test(obj.id))
|
||||
Config.previewFontFamily(Config.fontFamily);
|
||||
UpdateConfig.previewFontFamily(Config.fontFamily);
|
||||
obj.hover();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -625,10 +625,10 @@ function handleAlpha(event) {
|
|||
TestUI.setActiveWordTop(document.querySelector("#words .active").offsetTop);
|
||||
}
|
||||
|
||||
//max length of the input is 20 unless in zen mode
|
||||
//max length of the input is 20 unless in zen mode then its 30
|
||||
if (
|
||||
Config.mode == "zen" ||
|
||||
TestLogic.input.current.length < TestLogic.words.getCurrent().length + 20
|
||||
(Config.mode == "zen" && TestLogic.input.current.length < 30) ||
|
||||
(Config.mode !== "zen" && TestLogic.input.current.length < TestLogic.words.getCurrent().length + 20)
|
||||
) {
|
||||
TestLogic.input.appendCurrent(event["key"]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -294,6 +294,36 @@ const layouts = {
|
|||
"\\|", "яЯ", "чЧ", "сС", "мМ", "иИ", "тТ", "ьЬ", "бБ", "юЮ", ".,",
|
||||
" "
|
||||
]
|
||||
}
|
||||
},
|
||||
ISRT: {
|
||||
keymapShowTopRow: false,
|
||||
keys: [
|
||||
"`~", "1!", "2@", "3#", "4$", "5%", "6^", "7&", "8*", "9(", "0)", "-_", "=+",
|
||||
"yY", "cC", "lL", "mM", "kK", "zZ", "fF", "uU", ",<", "'\"", "[{", "]}", "\\|",
|
||||
"iI", "sS", "rR", "tT", "gG", "pP", "nN", "eE", "aA", "oO", ";:",
|
||||
"\\|", "vV", "wW", "dD", "jJ", "qQ", "bB", "hH", "/?", ".>", "xX",
|
||||
" "
|
||||
],
|
||||
},
|
||||
colemak_Qix: {
|
||||
keymapShowTopRow: true,
|
||||
keys: [
|
||||
"`~", "1!", "2@", "3#", "4$", "5%", "6^", "7&", "8*", "9(", "0)", "=+", "[{",
|
||||
";:", "lL", "cC", "mM", "kK", "jJ", "fF", "uU", "yY", "qQ", "-_", "]}", "\\|",
|
||||
"aA", "rR", "sS", "tT", "gG", "pP", "nN", "eE", "iI", "oO", "'\"",
|
||||
"\\|", "xX", "wW", "dD", "vV", "zZ", "bB", "hH", "/?", ".>", ",<",
|
||||
" "
|
||||
],
|
||||
},
|
||||
colemaQ: {
|
||||
keymapShowTopRow: true,
|
||||
keys: [
|
||||
"`~", "1!", "2@", "3#", "4$", "5%", "6^", "7&", "8*", "9(", "0)", "=+", "[{",
|
||||
";:", "wW", "fF", "pP", "bB", "jJ", "lL", "uU", "yY", "qQ", "-_", "]}", "\\|",
|
||||
"aA", "rR", "sS", "tT", "gG", "mM", "nN", "eE", "iI", "oO", "'\"",
|
||||
"\\|", "xX", "cC", "dD", "kK", "zZ", "vV", "hH", "/?", ".>", ",<",
|
||||
" "
|
||||
],
|
||||
},
|
||||
}
|
||||
export default layouts;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Config from "./config";
|
|||
import * as UI from "./ui";
|
||||
|
||||
let isPreviewingTheme = false;
|
||||
let randomTheme = null;
|
||||
export let randomTheme = null;
|
||||
|
||||
export const colorVars = [
|
||||
"--bg-color",
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
},
|
||||
{
|
||||
"name": "german",
|
||||
"languages": ["german", "german_1k", "swiss_german", "swiss_german_1k"]
|
||||
"languages": ["german", "german_1k", "german_10k", "swiss_german", "swiss_german_1k"]
|
||||
},
|
||||
{
|
||||
"name": "greek",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
,"indonesian_1k"
|
||||
,"german"
|
||||
,"german_1k"
|
||||
,"german_10k"
|
||||
,"swiss_german"
|
||||
,"swiss_german_1k"
|
||||
,"greek"
|
||||
|
|
|
|||
10007
static/languages/german_10k.json
Normal file
10007
static/languages/german_10k.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -124,7 +124,7 @@
|
|||
"да",
|
||||
"потому",
|
||||
"сторона",
|
||||
"какой-то",
|
||||
"ракета",
|
||||
"думать",
|
||||
"сделать",
|
||||
"страна",
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
"голова",
|
||||
"более",
|
||||
"делать",
|
||||
"что-то",
|
||||
"волк",
|
||||
"смотреть",
|
||||
"ребенок",
|
||||
"просто",
|
||||
|
|
|
|||
|
|
@ -523,5 +523,10 @@
|
|||
"name": "grand_prix",
|
||||
"bgColor": "#36475c",
|
||||
"textColor": "#c0d036"
|
||||
},
|
||||
{
|
||||
"name": "peaches",
|
||||
"bgColor": "#d3cfc6",
|
||||
"textColor": "#dd7a5f"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
11
static/themes/peaches.css
Normal file
11
static/themes/peaches.css
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:root {
|
||||
--bg-color: #e0d7c1;
|
||||
--main-color: #dd7a5f;
|
||||
--caret-color: #dd7a5f;
|
||||
--sub-color: #e7b28e;
|
||||
--text-color: #5f4c41;
|
||||
--error-color: #ff6961;
|
||||
--error-extra-color: #c23b22;
|
||||
--colorful-error-color: #ff6961;
|
||||
--colorful-error-extra-color: #c23b22;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue