fix(editor): fix themes the monaco editor (no-changelog) (#4521)

fix(editor): fix dark mode for the monaco editor (no-changelog)

just the default light and dark themes that are shipped with the editor

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Mutasem Aldmour 2022-11-04 13:16:44 +01:00 committed by GitHub
parent 78c024b247
commit c2c7927414
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,13 +61,13 @@ export default Vue.extend({
}
});
const darkModeBetaEnabled = document.body.classList.contains('theme-dark-beta') && window.matchMedia('(prefers-color-scheme: dark)').matches;
monaco.editor.defineTheme('n8nCustomTheme', {
base: 'vs',
base: darkModeBetaEnabled ? 'vs-dark' : 'vs',
inherit: true,
rules: [],
colors: {
'editor.background': '#f5f2f0',
},
colors: {},
});
monaco.editor.setTheme('n8nCustomTheme');
@ -129,7 +129,6 @@ export default Vue.extend({
.inputarea.ime-input,
.margin {
border-radius: var(--border-radius-base);
background-color: var(--color-background-xlight) !important;
}
}
}