mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
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:
parent
78c024b247
commit
c2c7927414
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue