mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-26 07:44:01 +08:00
moved tab change to theme picker file
This commit is contained in:
parent
eb4bb28c6c
commit
939a1b6e27
2 changed files with 10 additions and 10 deletions
|
@ -102,18 +102,8 @@ function apply(themeName: string, isCustom: boolean, isPreview = false): void {
|
|||
let name = "serika_dark";
|
||||
if (!isCustom) {
|
||||
name = themeName;
|
||||
Misc.swapElements(
|
||||
$('.pageSettings [tabContent="custom"]'),
|
||||
$('.pageSettings [tabContent="preset"]'),
|
||||
250
|
||||
);
|
||||
} else {
|
||||
name = "custom";
|
||||
Misc.swapElements(
|
||||
$('.pageSettings [tabContent="preset"]'),
|
||||
$('.pageSettings [tabContent="custom"]'),
|
||||
250
|
||||
);
|
||||
}
|
||||
|
||||
ThemeColors.reset();
|
||||
|
|
|
@ -252,12 +252,22 @@ export function updateActiveTab(forced = false): void {
|
|||
$customTabButton.addClass("active");
|
||||
refreshButtons();
|
||||
}
|
||||
Misc.swapElements(
|
||||
$('.pageSettings [tabContent="preset"]'),
|
||||
$('.pageSettings [tabContent="custom"]'),
|
||||
250
|
||||
);
|
||||
} else {
|
||||
$customTabButton.removeClass("active");
|
||||
if (!$presetTabButton.hasClass("active") || forced) {
|
||||
$presetTabButton.addClass("active");
|
||||
refreshButtons();
|
||||
}
|
||||
Misc.swapElements(
|
||||
$('.pageSettings [tabContent="custom"]'),
|
||||
$('.pageSettings [tabContent="preset"]'),
|
||||
250
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue