mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
* Moved menus -> menus.json::menus
* Move prompts -> prompts.json::prompts * Default to 80x25 if NAWS/ENV/CPR term size negotiations fail. Seeing this with Netrunner. May need more work.
This commit is contained in:
parent
9ac2e9af6e
commit
0d9add70bd
8 changed files with 511 additions and 454 deletions
|
@ -48,8 +48,8 @@ function getMenuConfig(name, cb) {
|
|||
});
|
||||
},
|
||||
function locateMenuConfig(menuJson, callback) {
|
||||
if(_.isObject(menuJson[name])) {
|
||||
menuConfig = menuJson[name];
|
||||
if(_.has(menuJson, [ 'menus', name ])) {
|
||||
menuConfig = menuJson.menus[name];
|
||||
callback(null);
|
||||
} else {
|
||||
callback(new Error('No menu entry for \'' + name + '\''));
|
||||
|
@ -66,7 +66,7 @@ function getMenuConfig(name, cb) {
|
|||
},
|
||||
function locatePromptConfig(promptJson, callback) {
|
||||
if(promptJson) {
|
||||
if(_.isObject(promptJson[menuConfig.prompt])) {
|
||||
if(_.has(promptJson, [ 'prompts', menuConfig.prompt ])) {
|
||||
menuConfig.promptConfig = promptJson[menuConfig.prompt];
|
||||
} else {
|
||||
callback(new Error('No prompt entry for \'' + menuConfig.prompt + '\''));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue