Skip to content

Commit

Permalink
Fix top level await
Browse files Browse the repository at this point in the history
  • Loading branch information
zerebos committed Oct 22, 2024
1 parent 97c5ac7 commit e292885
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/lib/data/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ export const fetchColorScheme = async (theme: string) => {
return {colorSchemeResponse};
};

const {themeFiles} = await fetchThemeFiles();
const themeFileNames = themeFiles && themeFiles.map((file: ThemeResponse) => file.name);
fetchThemeFiles().then(({themeFiles}) => {
const themeFileNames = themeFiles && themeFiles.map((file: ThemeResponse) => file.name);
const themeSetting = settings.find(p => p.id === "colors")?.groups.find(g => g.id === "general")?.settings.find(s => s.type === "theme");
themeSetting?.options.push(...themeFileNames);
});

export default [
const settings = [
{
id: "application",
name: "Application",
Expand Down Expand Up @@ -334,7 +337,7 @@ export default [
note: "Any colors selected after setting this will overwrite the theme's colors.",
type: "theme",
value: "",
options: ["", ...themeFileNames]
options: [{name: "Custom", value: ""}]
},
{id: "boldIsBright", name: "Bold text uses bright colors", type: "switch", value: false},
{id: "minimumContrast", name: "Minimum contrast", type: "number", value: 1, range: true, min: 1, max: 21, step: 0.1},
Expand Down Expand Up @@ -525,3 +528,6 @@ export default [
]
},
] as Panel[];


export default settings;

0 comments on commit e292885

Please sign in to comment.