diff --git a/bin/index.mts b/bin/index.mts
index f9ff12f54..5db814a2e 100755
--- a/bin/index.mts
+++ b/bin/index.mts
@@ -21,7 +21,6 @@ import { logBuildPlugin } from "../src/util.mjs";
import { sassPlugin } from "esbuild-sass-plugin";
import { fileURLToPath } from "url";
import { AddonType, getAddonFolder, isMonoRepo, selectAddon } from "./mono.mjs";
-import { ThemeManifest } from "src/types";
interface BaseArgs {
watch?: boolean;
diff --git a/cspell.json b/cspell.json
index 2e4895344..f1a6b0cf6 100644
--- a/cspell.json
+++ b/cspell.json
@@ -45,6 +45,7 @@
"notif",
"notrack",
"outfile",
+ "outdir",
"popout",
"postpublish",
"Promisable",
diff --git a/src/renderer/coremods/settings/pages/Addons.tsx b/src/renderer/coremods/settings/pages/Addons.tsx
index e15cc84c4..eec695734 100644
--- a/src/renderer/coremods/settings/pages/Addons.tsx
+++ b/src/renderer/coremods/settings/pages/Addons.tsx
@@ -702,7 +702,7 @@ export const Addons = (type: AddonType): React.ReactElement => {
) : null
) : (
- (SettingsElement = getSettingsElement(section.slice(`rp_${type}_`.length+1), type)) && (
+ (SettingsElement = getSettingsElement(section.slice(`rp_${type}_`.length + 1), type)) && (
diff --git a/src/renderer/managers/themes.ts b/src/renderer/managers/themes.ts
index 5ee7efa01..e0254db05 100644
--- a/src/renderer/managers/themes.ts
+++ b/src/renderer/managers/themes.ts
@@ -49,17 +49,15 @@ export function load(id: string): void {
const theme = themes.get(id)!;
let themeSettings = settings.get(theme.manifest.id);
if (!themeSettings) themeSettings = {};
- console.log(themeSettings);
if (!themeSettings.chosenPreset) {
themeSettings.chosenPreset = theme.manifest.presets?.find((x) => x.default)?.path;
- console.log(themeSettings);
settings.set(theme.manifest.id, themeSettings);
}
let el;
if (theme.manifest.main) {
el = loadStyleSheet(`replugged://theme/${theme.path}/${theme.manifest.main}`);
- } else if (themeSettings?.chosenPreset) {
+ } else if (themeSettings.chosenPreset) {
el = loadStyleSheet(`replugged://theme/${theme.path}/${themeSettings.chosenPreset}`);
} else {
throw new Error(`Theme ${id} does not have a main variant.`);
diff --git a/src/types/addon.ts b/src/types/addon.ts
index 194d02ac0..a9824725b 100644
--- a/src/types/addon.ts
+++ b/src/types/addon.ts
@@ -54,11 +54,14 @@ export const theme = common.extend({
type: z.literal("replugged-theme"),
main: z.string().optional(),
splash: z.string().optional(),
- presets: z.object({
- label: z.string(),
- path: z.string(),
- default: z.boolean().optional(),
- }).array().optional(),
+ presets: z
+ .object({
+ label: z.string(),
+ path: z.string(),
+ default: z.boolean().optional(),
+ })
+ .array()
+ .optional(),
});
export type ThemeManifest = z.infer;
@@ -94,6 +97,6 @@ export type AddonSettings = {
export type ThemeSettings = AddonSettings & {
[x: string]: {
- "chosenPreset"?: string;
+ chosenPreset?: string;
};
-}
+};