mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-28 13:36:16 +02:00
Major progress on revamp
* Deprecated explicit prompt.hjson/general.promptFile, etc.: menu.hjson can simply include any number of files * All menus and themes, their events, etc. are managed by ThemeManager allowing includes, refs, etc. and much cleaner code
This commit is contained in:
parent
1a96ad41d2
commit
4d4be5d6a9
15 changed files with 331 additions and 400 deletions
|
@ -24,10 +24,11 @@ function getMenuConfig(client, name, cb) {
|
|||
async.waterfall(
|
||||
[
|
||||
function locateMenuConfig(callback) {
|
||||
if(_.has(client.currentTheme, [ 'menus', name ])) {
|
||||
const menuConfig = client.currentTheme.menus[name];
|
||||
const menuConfig = _.get(client.currentTheme, [ 'menus', name ]);
|
||||
if (menuConfig) {
|
||||
return callback(null, menuConfig);
|
||||
}
|
||||
|
||||
return callback(Errors.DoesNotExist(`No menu entry for "${name}"`));
|
||||
},
|
||||
function locatePromptConfig(menuConfig, callback) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue