fix font family settings

This commit is contained in:
Julian Freeman
2025-12-01 09:03:01 -04:00
parent 799c65a3d7
commit c2cf6fd644
2 changed files with 31 additions and 21 deletions

View File

@@ -10,17 +10,22 @@ import { EditorView } from '@codemirror/view'; // Import EditorView
const store = useRequestStore();
const settings = useSettingsStore();
const transparentTheme = EditorView.theme({
"&": {
backgroundColor: "transparent !important",
height: "100%"
},
".cm-gutters": {
backgroundColor: "transparent !important"
}
});
const extensions = computed(() => {
const theme = EditorView.theme({
"&": {
backgroundColor: "transparent !important",
height: "100%"
},
".cm-content, .cm-gutter": {
fontFamily: `${settings.editorFontFamily} !important`
},
".cm-gutters": {
backgroundColor: "transparent !important"
}
});
const extensions = [json(), oneDark, transparentTheme, EditorView.editable.of(false)];
return [json(), oneDark, theme, EditorView.editable.of(false)];
});
const formattedBody = computed(() => {
if (!store.activeRequest.response) return '';