Skip to content

Build your personal knowledge base with Trilium Notes

fix(sql_console): background color

Elian Doran93a1d6221868
diff --git a/apps/client/src/widgets/type_widgets/abstract_code_type_widget.ts b/apps/client/src/widgets/type_widgets/abstract_code_type_widget.ts
index 7343455ade..9da76b559a 100644
--- a/apps/client/src/widgets/type_widgets/abstract_code_type_widget.ts
+++ b/apps/client/src/widgets/type_widgets/abstract_code_type_widget.ts
@@ -129,6 +129,11 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
}
updateBackgroundColor(color?: string) {
+ if (this.note?.mime === "text/x-sqlite;schema=trilium") {
+ // Don't apply a background color for SQL console notes.
+ return;
+ }
+
const $editorEl = $(this.codeEditor.dom);
this.$widget.closest(".scrolling-container").css("background-color", color ?? $editorEl.css("background-color"));
}