Merge pull request #32 from Miodec/master

merge
This commit is contained in:
UnrealApex 2021-05-02 12:26:27 -07:00 committed by GitHub
commit c6140a7707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 3052 additions and 8 deletions

View file

@ -370,7 +370,10 @@ $("#commandLineWrapper #commandLine .suggestions").on("mouseover", (e) => {
let list = CommandlineLists.current[CommandlineLists.current.length - 1];
$.each(list.list, (index, obj) => {
if (obj.id == hoverId) {
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))
UpdateConfig.previewFontFamily(Config.fontFamily);
@ -492,7 +495,10 @@ $(document).keydown((e) => {
CommandlineLists.current[CommandlineLists.current.length - 1];
$.each(list.list, (index, obj) => {
if (obj.id == hoverId) {
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))
UpdateConfig.previewFontFamily(Config.fontFamily);

View file

@ -54,7 +54,8 @@ function handleTab(event) {
} else if (
!TestUI.resultCalculating &&
$("#commandLineWrapper").hasClass("hidden") &&
$("#simplePopupWrapper").hasClass("hidden")
$("#simplePopupWrapper").hasClass("hidden") &&
!$(".page.pageLogin").hasClass("active")
) {
if ($(".pageTest").hasClass("active")) {
if (Config.quickTab) {
@ -629,7 +630,8 @@ function handleAlpha(event) {
//max length of the input is 20 unless in zen mode then its 30
if (
(Config.mode == "zen" && TestLogic.input.current.length < 30) ||
(Config.mode !== "zen" && TestLogic.input.current.length < TestLogic.words.getCurrent().length + 20)
(Config.mode !== "zen" &&
TestLogic.input.current.length < TestLogic.words.getCurrent().length + 20)
) {
TestLogic.input.appendCurrent(event["key"]);
}

View file

@ -5,6 +5,7 @@ import * as VerificationController from "./verification-controller";
import * as Settings from "./settings";
import * as RouteController from "./route-controller";
import * as UI from "./ui";
import * as SignOutButton from "./sign-out-button";
ManualRestart.set();
Misc.migrateFromCookies();
@ -30,6 +31,9 @@ $(document).ready(() => {
.removeClass("hidden")
.stop(true, true)
.animate({ opacity: 1 }, 250, () => {
if (window.location.pathname === "/account") {
SignOutButton.show();
}
if (window.location.pathname === "/verify") {
const fragment = new URLSearchParams(window.location.hash.slice(1));
if (fragment.has("access_token")) {

View file

@ -121,7 +121,11 @@ export function set(themeName) {
export function clearPreview() {
if (isPreviewingTheme) {
isPreviewingTheme = false;
apply(Config.theme);
if (Config.customTheme) {
apply("custom");
} else {
apply(Config.theme);
}
}
}

View file

@ -33,7 +33,7 @@
},
{
"name": "lithuanian",
"languages": ["lithuanian", "lithuanian_1k"]
"languages": ["lithuanian", "lithuanian_1k", "lithuanian_3k"]
},
{
"name": "indonesian",

View file

@ -77,6 +77,7 @@
,"lojban_cmavo"
,"lithuanian"
,"lithuanian_1k"
,"lithuanian_3k"
,"toki_pona"
,"twitch_emotes"
,"pig_latin"

View file

@ -1,5 +1,5 @@
{
"name": "german_1k",
"name": "german_10k",
"_comment": "Sourced from: https://wortschatz.uni-leipzig.de/de/download/German and https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists#German",
"leftToRight": true,
"words": [
@ -10004,4 +10004,4 @@
"Zwölf",
"zwölf"
]
}
}

File diff suppressed because it is too large Load diff

View file

@ -528,5 +528,10 @@
"name": "peaches",
"bgColor": "#d3cfc6",
"textColor": "#dd7a5f"
},
{
"name": "bouquet",
"bgColor": "#38564a",
"textColor": "#ffbdb2"
}
]

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

@ -0,0 +1,11 @@
:root {
--bg-color: #173f35;
--main-color: #eaa09c;
--caret-color: #eaa09c;
--sub-color: #408e7b;
--text-color: #e9e0d2;
--error-color: #d44729;
--error-extra-color: #8f2f19;
--colorful-error-color: #d44729;
--colorful-error-extra-color: #8f2f19;
}