fix font family settings
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useRequestStore } from '../stores/requestStore';
|
import { useRequestStore } from '../stores/requestStore';
|
||||||
import { useSettingsStore } from '../stores/settingsStore';
|
import { useSettingsStore } from '../stores/settingsStore';
|
||||||
import KeyValueEditor from './KeyValueEditor.vue';
|
import KeyValueEditor from './KeyValueEditor.vue';
|
||||||
@@ -16,18 +16,23 @@ const settings = useSettingsStore();
|
|||||||
const activeTab = ref('params');
|
const activeTab = ref('params');
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
const transparentTheme = EditorView.theme({
|
const extensions = computed(() => {
|
||||||
"&": {
|
const theme = EditorView.theme({
|
||||||
backgroundColor: "transparent !important",
|
"&": {
|
||||||
height: "100%"
|
backgroundColor: "transparent !important",
|
||||||
},
|
height: "100%",
|
||||||
".cm-gutters": {
|
},
|
||||||
backgroundColor: "transparent !important"
|
".cm-content, .cm-gutter": {
|
||||||
}
|
fontFamily: `${settings.editorFontFamily} !important`
|
||||||
|
},
|
||||||
|
".cm-gutters": {
|
||||||
|
backgroundColor: "transparent !important"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return [json(), oneDark, theme];
|
||||||
});
|
});
|
||||||
|
|
||||||
const extensions = [json(), oneDark, transparentTheme];
|
|
||||||
|
|
||||||
const methods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'];
|
const methods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'];
|
||||||
|
|
||||||
const executeRequest = async () => {
|
const executeRequest = async () => {
|
||||||
|
|||||||
@@ -10,17 +10,22 @@ import { EditorView } from '@codemirror/view'; // Import EditorView
|
|||||||
const store = useRequestStore();
|
const store = useRequestStore();
|
||||||
const settings = useSettingsStore();
|
const settings = useSettingsStore();
|
||||||
|
|
||||||
const transparentTheme = EditorView.theme({
|
const extensions = computed(() => {
|
||||||
"&": {
|
const theme = EditorView.theme({
|
||||||
backgroundColor: "transparent !important",
|
"&": {
|
||||||
height: "100%"
|
backgroundColor: "transparent !important",
|
||||||
},
|
height: "100%"
|
||||||
".cm-gutters": {
|
},
|
||||||
backgroundColor: "transparent !important"
|
".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(() => {
|
const formattedBody = computed(() => {
|
||||||
if (!store.activeRequest.response) return '';
|
if (!store.activeRequest.response) return '';
|
||||||
|
|||||||
Reference in New Issue
Block a user