Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

theme: confirm before downloading code-block css

ammarahm-ed14d67142096c
diff --git a/apps/theme-builder/src/components/theme-builder/index.tsx b/apps/theme-builder/src/components/theme-builder/index.tsx
index 3f22a9f27..4b4df59e4 100644
--- a/apps/theme-builder/src/components/theme-builder/index.tsx
+++ b/apps/theme-builder/src/components/theme-builder/index.tsx
@@ -643,13 +643,25 @@ function exportTheme(theme: ThemeDefinition) {
}),
`${theme.id}.json`
);
+ const confirmed = window.confirm(
+ "Do you also want to download code-block.css for this theme?"
+ );
+ if (confirmed) {
+ FileSaver.saveAs(
+ new Blob([theme.codeBlockCSS], {
+ type: "text/plain"
+ }),
+ `code-block.css`
+ );
+ }
}
function themeToJSON(theme: ThemeDefinition) {
return JSON.stringify(
{
$schema: JSON_SCHEMA_URL,
- ...theme
+ ...theme,
+ codeBlockCSS: undefined
},
undefined,
2