mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-12 23:23:34 +08:00
fixed custom theme editing saving colors in the wrong order
This commit is contained in:
parent
9378d269ee
commit
3e233d9bd9
1 changed files with 8 additions and 6 deletions
|
|
@ -23,6 +23,7 @@ import {
|
|||
import { isElementVisible, isLocalhost, isPasswordStrong } from "../utils/misc";
|
||||
import * as CustomTextState from "../states/custom-text-name";
|
||||
import * as Skeleton from "./skeleton";
|
||||
import * as ThemeController from "../controllers/theme-controller";
|
||||
|
||||
const wrapperId = "simplePopupWrapper";
|
||||
|
||||
|
|
@ -1247,12 +1248,13 @@ list["updateCustomTheme"] = new SimplePopup(
|
|||
|
||||
let newColors: string[] = [];
|
||||
if (updateColors === "true") {
|
||||
$.each(
|
||||
$(".pageSettings .customTheme .customThemeEdit [type='color']"),
|
||||
(_index, element) => {
|
||||
newColors.push($(element).attr("value") as string);
|
||||
}
|
||||
);
|
||||
for (const color of ThemeController.colorVars) {
|
||||
newColors.push(
|
||||
$(
|
||||
`.pageSettings .customTheme .customThemeEdit #${color}[type='color']`
|
||||
).attr("value") as string
|
||||
);
|
||||
}
|
||||
} else {
|
||||
newColors = customTheme.colors;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue