mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-23 05:56:10 +08:00
fixed themes being in the wrong order in the command line
This commit is contained in:
parent
6e011edb05
commit
374b1a19b0
2 changed files with 2 additions and 5 deletions
|
@ -2135,10 +2135,6 @@ export let themeCommands = {
|
|||
};
|
||||
|
||||
Misc.getThemesList().then((themes) => {
|
||||
//sort themes by name
|
||||
themes = themes.sort((a, b) => {
|
||||
return a.name < b.name;
|
||||
});
|
||||
themes.forEach((theme) => {
|
||||
themeCommands.list.push({
|
||||
id: "changeTheme" + Misc.capitalizeFirstLetter(theme.name),
|
||||
|
|
|
@ -80,7 +80,8 @@ export async function getSortedThemesList() {
|
|||
if (themesList == null) {
|
||||
await getThemesList();
|
||||
}
|
||||
const sorted = themesList.sort((a, b) => {
|
||||
let sorted = [...themesList];
|
||||
sorted = sorted.sort((a, b) => {
|
||||
let b1 = hexToHSL(a.bgColor);
|
||||
let b2 = hexToHSL(b.bgColor);
|
||||
return b2.lgt - b1.lgt;
|
||||
|
|
Loading…
Add table
Reference in a new issue