0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-09 20:38:40 +00:00

move darkvision to library, and sort themes

This commit is contained in:
Víctor Losada Hernández
2026-04-22 17:05:17 +02:00
parent 49e4f0a597
commit f863871173
5 changed files with 15 additions and 134 deletions
@@ -29,7 +29,7 @@ import cm5Themes from 'codemirror-5-themes';
const themes = { default: defaultCM5Theme, ...cm5Themes, darkbrewery };
const EditorThemes = Object.entries(themes)
const themeNames = Object.entries(themes)
.filter(([name, value]) =>
Array.isArray(value) &&
!name.endsWith('Init') &&
@@ -37,6 +37,13 @@ const EditorThemes = Object.entries(themes)
)
.map(([name]) => name);
const EditorThemes = [
'default',
...themeNames
.filter(name => name !== 'default')
.sort((a, b) => a.localeCompare(b))
];
const execute = function(val, props){
if(_.isFunction(val)) return val(props);
return val;