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', { monaco.editor.defineTheme('n8nCustomTheme', {
base: 'vs', base: darkModeBetaEnabled ? 'vs-dark' : 'vs',
inherit: true, inherit: true,
rules: [], rules: [],
colors: { colors: {},
'editor.background': '#f5f2f0',
},
}); });
monaco.editor.setTheme('n8nCustomTheme'); monaco.editor.setTheme('n8nCustomTheme');
@ -129,7 +129,6 @@ export default Vue.extend({
.inputarea.ime-input, .inputarea.ime-input,
.margin { .margin {
border-radius: var(--border-radius-base); border-radius: var(--border-radius-base);
background-color: var(--color-background-xlight) !important;
} }
} }
} }