mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 15:56:24 +08:00
fixed current theme indicator not behaving properly
This commit is contained in:
parent
888df4413a
commit
b17ffe3ec6
|
@ -1421,6 +1421,7 @@ $("#commandLineWrapper #commandLine .suggestions").click((e) => {
|
|||
$("#commandLineWrapper").click((e) => {
|
||||
if ($(e.target).attr("id") === "commandLineWrapper") {
|
||||
hideCommandLine();
|
||||
setTheme(config.theme, true);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -4827,6 +4827,9 @@ $(document).on("mouseenter", "#resultWordsHistory .words .word", (e) => {
|
|||
});
|
||||
|
||||
$(document).on("click", "#bottom .leftright .right .current-theme", (e) => {
|
||||
if (config.customTheme) {
|
||||
togglePresetCustomTheme();
|
||||
}
|
||||
currentCommands.push(commandsThemes);
|
||||
showCommandLine();
|
||||
});
|
||||
|
|
|
@ -969,6 +969,7 @@ function applyCustomThemeColors() {
|
|||
document.documentElement.style.setProperty(e, array[index]);
|
||||
});
|
||||
} else {
|
||||
$(".current-theme").text(config.theme.replace('_',' '));
|
||||
previewTheme(config.theme);
|
||||
colorVars.forEach((e) => {
|
||||
document.documentElement.style.setProperty(e, "");
|
||||
|
|
Loading…
Reference in a new issue