mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-29 03:20:46 +08:00
fix: typed letters not visible in tts funbox if highlight=off (@fehmer) (#5496)
This commit is contained in:
parent
120b660efc
commit
90e234f77a
2 changed files with 15 additions and 0 deletions
|
|
@ -790,12 +790,15 @@ export async function updateWordElement(
|
|||
const funbox = FunboxList.get(Config.funbox).find(
|
||||
(f) => f.functions?.getWordHtml
|
||||
);
|
||||
const isTts = FunboxList.get(Config.funbox).find((it) => it.name === "tts");
|
||||
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
const charCorrect = currentWord[i] === input[i];
|
||||
|
||||
let correctClass = "correct";
|
||||
if (Config.highlightMode === "off") {
|
||||
correctClass = "";
|
||||
if (isTts) correctClass = "visible";
|
||||
}
|
||||
|
||||
let currentLetter = currentWord[i] as string;
|
||||
|
|
|
|||
|
|
@ -5,3 +5,15 @@
|
|||
#words .word {
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
#words .word letter.visible {
|
||||
color: var(--sub-color) !important;
|
||||
}
|
||||
|
||||
#words.flipped .word letter.visible {
|
||||
color: var(--text-color) !important;
|
||||
}
|
||||
|
||||
#words.flipped.colorfulMode .word letter.visible {
|
||||
color: var(--main-color) !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue