mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-10 14:10:59 +08:00
Merge branch 'master' into newads
This commit is contained in:
commit
e22c24f8e7
1 changed files with 4 additions and 3 deletions
|
|
@ -9,6 +9,7 @@ import * as Loader from "../elements/loader";
|
|||
import * as DB from "../db";
|
||||
import * as ConfigEvent from "../observables/config-event";
|
||||
import { Auth } from "../firebase";
|
||||
import * as ActivePage from "../states/active-page";
|
||||
|
||||
export function updateActiveButton(): void {
|
||||
let activeThemeName = Config.theme;
|
||||
|
|
@ -248,7 +249,6 @@ export async function refreshButtons(): Promise<void> {
|
|||
}
|
||||
themesEl.innerHTML = themesElHTML;
|
||||
}
|
||||
updateActiveButton();
|
||||
}
|
||||
|
||||
export function setCustomInputs(noThemeUpdate = false): void {
|
||||
|
|
@ -367,7 +367,6 @@ $(".pageSettings").on("click", ".section.themes .theme.button", (e) => {
|
|||
const theme = $(e.currentTarget).attr("theme");
|
||||
if (!$(e.target).hasClass("favButton") && theme !== undefined) {
|
||||
UpdateConfig.setTheme(theme);
|
||||
updateActiveButton();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -497,5 +496,7 @@ $(".pageSettings .saveCustomThemeButton").on("click", async () => {
|
|||
|
||||
ConfigEvent.subscribe((eventKey) => {
|
||||
if (eventKey === "customThemeId") refreshButtons();
|
||||
// if (eventKey === "customTheme") updateActiveTab();
|
||||
if (eventKey === "theme" && ActivePage.get() === "settings") {
|
||||
updateActiveButton();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue