web/elements: improve codemirror contrast in dark theme
closes #4622 Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -11,6 +11,7 @@ import {
|
||||
} from "@codemirror/language";
|
||||
import * as yamlMode from "@codemirror/legacy-modes/mode/yaml";
|
||||
import { Compartment, EditorState, Extension } from "@codemirror/state";
|
||||
import { oneDark } from "@codemirror/theme-one-dark";
|
||||
import { EditorView, drawSelection, keymap, lineNumbers } from "@codemirror/view";
|
||||
import { AKElement } from "@goauthentik/elements/Base";
|
||||
import YAML from "yaml";
|
||||
@ -98,14 +99,7 @@ export class CodeMirrorTextarea<T> extends AKElement {
|
||||
},
|
||||
{ dark: false },
|
||||
);
|
||||
this.themeDark = EditorView.theme(
|
||||
{
|
||||
"&": {
|
||||
backgroundColor: "var(--ak-dark-background-light)",
|
||||
},
|
||||
},
|
||||
{ dark: true },
|
||||
);
|
||||
this.themeDark = oneDark;
|
||||
}
|
||||
|
||||
private getInnerValue(): string {
|
||||
|
||||
Reference in New Issue
Block a user