chore: add svelte component layer with monaco editor

This commit is contained in:
HorizonCode committed 2026-10-31 10:28:33 +01:00
1 parent 8071085e94
commit 54f7f81160
55 files changed
+20563 -2043

No files matched your search

+11 -11
View File
@@ -457,18 +457,18 @@ export const deleteTheme = async (themeToUninstall: Theme) => {
return false;
}
patchTheme(themeToUninstall.name, (current) => ({ ...current, status: 'deleting' }));
await fs.remove(themeFolder, { recursive: true });
try {
await fs.remove(themeFolder, { recursive: true });
} catch (error) {
patchTheme(themeToUninstall.name, (current) => ({ ...current, status: 'installed' }));
throw error;
}
patchTheme(themeToUninstall.name, (current) => ({
...current,
scriptUrl: '',
cssStyle: '',
assets: '',
definition: undefined,
preview: `${THEME_REPOSITORY}/raw/branch/main/previews/${toSafeName(themeToUninstall.name)}.png`,
status: 'not-installed',
updateAvailable: false,
}));
// Remove the local card entirely, then let reloadThemes add it back as a
// downloadable theme only when the repository actually offers it. Marking
// local-only themes as "not-installed" left them stuck in the gallery with
// an unusable Download Theme button.
custom_themes.update((themes) => themes.filter((theme) => theme.name !== themeToUninstall.name));
await reloadThemes();
return true;