Skip to content

Commit

Permalink
custom theme edit fix (#3236)
Browse files Browse the repository at this point in the history
  • Loading branch information
aNOOBisTheGod authored Jun 26, 2022
1 parent 4092d45 commit b74215a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/ts/popups/simple-popups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1088,12 +1088,13 @@ list["updateCustomTheme"] = new SimplePopup(
}

const newTheme = {
name: name,
name: name.replaceAll(" ", "_"),
colors: newColors,
};
Loader.show();
await DB.editCustomTheme(customTheme._id, newTheme);
const validation = await DB.editCustomTheme(customTheme._id, newTheme);
Loader.hide();
if (!validation) return;
UpdateConfig.setCustomThemeColors(newColors);
Notifications.add("Custom theme updated", 1);
ThemePicker.refreshButtons();
Expand Down

0 comments on commit b74215a

Please # to comment.