From e13615c1aeb03bfc3acc5fdb914d2b1d7f6c2171 Mon Sep 17 00:00:00 2001 From: Jens L Date: Fri, 10 Mar 2023 20:11:02 +0100 Subject: [PATCH] web/elements: fix flipped theme in codemirror (#4901) --- web/src/elements/Base.ts | 1 - web/src/elements/CodeMirror.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/elements/Base.ts b/web/src/elements/Base.ts index b866c0623..a0be77b6f 100644 --- a/web/src/elements/Base.ts +++ b/web/src/elements/Base.ts @@ -131,7 +131,6 @@ export class AKElement extends LitElement { } _activateTheme(root: AdoptedStyleSheetsElement, theme: UiThemeEnum) { - console.log("activating theme", theme, this._activeTheme, this); if (theme === this._activeTheme) { return; } diff --git a/web/src/elements/CodeMirror.ts b/web/src/elements/CodeMirror.ts index f5425c4ce..58e271897 100644 --- a/web/src/elements/CodeMirror.ts +++ b/web/src/elements/CodeMirror.ts @@ -150,7 +150,7 @@ export class CodeMirrorTextarea extends AKElement { EditorView.lineWrapping, EditorState.readOnly.of(this.readOnly), EditorState.tabSize.of(2), - this.theme.of(this.activeTheme === UiThemeEnum.Dark ? this.themeLight : this.themeDark), + this.theme.of(this.activeTheme === UiThemeEnum.Dark ? this.themeDark : this.themeLight), ]; this.editor = new EditorView({ extensions: extensions.filter((p) => p) as Extension[],