mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-05-09 22:48:39 +00:00
move darkvision to library, and sort themes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user