Skip to content

Commit 06e9416

Browse files
committed
chore(editor): remove line numbers
1 parent 38d77ac commit 06e9416

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/app/src/components/content/ContentEditorCode.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const props = defineProps({
1919
})
2020
2121
const document = defineModel<DatabasePageItem>()
22-
const { mediaTree, host } = useStudio()
22+
const { mediaTree, host, ui } = useStudio()
2323
2424
const editor = shallowRef<Editor.IStandaloneCodeEditor | null>(null)
2525
const 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
93102
function setContent(document: DatabasePageItem) {

0 commit comments

Comments
 (0)