mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-26 04:28:17 +02:00
Initial version of hot-reload of config, menus, and prompts
* Themes use ES6 Map vs object{} * Re-write and re-enable config cache using sane * Events sent for config, prompt, or menu changes * Event sent for theme changes * Theme (or parent menu/prompt) changes cause re-merge and updates to connected clients
This commit is contained in:
parent
1870db7d38
commit
4aab8224ed
8 changed files with 275 additions and 242 deletions
|
@ -164,13 +164,14 @@ exports.getModule = class UserConfigModule extends MenuModule {
|
|||
vc.loadFromMenuConfig( { callingMenu : self, mciMap : mciData.menu }, callback);
|
||||
},
|
||||
function prepareAvailableThemes(callback) {
|
||||
self.availThemeInfo = _.sortBy(_.map(theme.getAvailableThemes(), function makeThemeInfo(t, themeId) {
|
||||
self.availThemeInfo = _.sortBy([...theme.getAvailableThemes()].map(entry => {
|
||||
const theme = entry[1];
|
||||
return {
|
||||
themeId : themeId,
|
||||
name : t.info.name,
|
||||
author : t.info.author,
|
||||
desc : _.isString(t.info.desc) ? t.info.desc : '',
|
||||
group : _.isString(t.info.group) ? t.info.group : '',
|
||||
themeId : theme.info.themeId,
|
||||
name : theme.info.name,
|
||||
author : theme.info.author,
|
||||
desc : _.isString(theme.info.desc) ? theme.info.desc : '',
|
||||
group : _.isString(theme.info.group) ? theme.info.group : '',
|
||||
};
|
||||
}), 'name');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue