@@ -19,7 +19,7 @@ const props = defineProps({
1919})
2020
2121const document = defineModel <DatabasePageItem >()
22- const { mediaTree, host } = useStudio ()
22+ const { mediaTree, host, ui } = useStudio ()
2323
2424const editor = shallowRef <Editor .IStandaloneCodeEditor | null >(null )
2525const editorRef = ref ()
@@ -48,6 +48,8 @@ onMounted(async () => {
4848
4949 // create a Monaco editor instance
5050 editor .value = monaco .createEditor (editorRef .value , {
51+ // theme: ui.colorMode.value === 'light' ? 'vs' : 'vs-dark',
52+ lineNumbers: ' off' ,
5153 readOnly: props .readOnly ,
5254 scrollbar: props .readOnly
5355 ? {
@@ -88,6 +90,13 @@ onMounted(async () => {
8890
8991 // create and attach a model to the editor
9092 editor .value .setModel (monaco .editor .createModel (content .value , ' mdc' ))
93+
94+ // Set the theme based on the color mode
95+ // watch(ui.colorMode, () => {
96+ // editor.value?.updateOptions({
97+ // theme: ui.colorMode.value === 'light' ? 'vs' : 'vs-dark',
98+ // })
99+ // })
91100})
92101
93102function setContent(document : DatabasePageItem ) {
0 commit comments