mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 05:17:51 +08:00
updating the theme name ui element only if actually applying the theme (not when previewing) looks like a possible solution to #1737
This commit is contained in:
parent
f297978c69
commit
fee74f54ab
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,6 @@ export function apply(themeName, isPreview = false) {
|
|||
// $("#currentTheme").attr("href", `themes/${name}.css`);
|
||||
loadStyle(name).then(() => {
|
||||
ThemeColors.update();
|
||||
$(".current-theme .text").text(themeName.replace("_", " "));
|
||||
if (themeName === "custom") {
|
||||
colorVars.forEach((e, index) => {
|
||||
document.documentElement.style.setProperty(
|
||||
|
@ -125,6 +124,7 @@ export function apply(themeName, isPreview = false) {
|
|||
}
|
||||
if (!isPreview) {
|
||||
ThemeColors.get().then((colors) => {
|
||||
$(".current-theme .text").text(themeName.replace("_", " "));
|
||||
$(".keymap-key").attr("style", "");
|
||||
ChartController.updateAllChartColors();
|
||||
updateFavicon(128, 32);
|
||||
|
|
Loading…
Reference in a new issue