diff --git a/frontend/src/components/InterfaceViewModal.vue b/frontend/src/components/InterfaceViewModal.vue index b71c400..453cd6e 100644 --- a/frontend/src/components/InterfaceViewModal.vue +++ b/frontend/src/components/InterfaceViewModal.vue @@ -3,8 +3,7 @@ import Modal from "./Modal.vue"; import {computed, ref, watch} from "vue"; import { useI18n } from 'vue-i18n'; import {interfaceStore} from "@/stores/interfaces"; -import Prism from 'vue-prism-component' -import 'prismjs/components/prism-ini' +import Prism from '@/helpers/prism-setup'; const { t } = useI18n() @@ -17,6 +16,14 @@ const props = defineProps({ const configString = ref("") +const highlightedConfig = computed(() => { + const grammar = Prism.languages.ini + if (grammar) { + return Prism.highlight(configString.value, grammar, 'ini') + } + return configString.value +}) + const emit = defineEmits(['close']) const selectedInterface = computed(() => { @@ -51,7 +58,7 @@ function close() {