mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-24 03:30:40 +02:00
* Delete mods/login.js (not used)
* More fallbackMenuModule & gotoMenuModule clean up -- should all be using new system now
This commit is contained in:
parent
f7a7423b32
commit
b1be5cdff4
12 changed files with 16 additions and 85 deletions
|
@ -448,15 +448,6 @@ Client.prototype.address = function() {
|
|||
return this.input.address();
|
||||
};
|
||||
|
||||
// :TODO: remove these deprecated wrappers:
|
||||
Client.prototype.gotoMenuModule = function(options, cb) {
|
||||
this.menuStack.goto(options.name, options, cb);
|
||||
};
|
||||
|
||||
Client.prototype.fallbackMenuModule = function(options, cb) {
|
||||
this.menuStack.prev(cb);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Default error handlers
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -834,9 +834,7 @@ function FullScreenEditorModule(options) {
|
|||
replyDiscard : function(formData, extraArgs) {
|
||||
// :TODO: need to prompt yes/no
|
||||
// :TODO: @method for fallback would be better
|
||||
self.client.fallbackMenuModule(function fallback(err) {
|
||||
console.log(err)
|
||||
});
|
||||
self.prevMenu();
|
||||
},
|
||||
*/
|
||||
editModeMenuHelp : function(formData, extraArgs) {
|
||||
|
|
|
@ -7,24 +7,6 @@ var loadMenu = require('./menu_util.js').loadMenu;
|
|||
var _ = require('lodash');
|
||||
var assert = require('assert');
|
||||
|
||||
/*
|
||||
MenuStack(client)
|
||||
stack[] push, pop, ...
|
||||
|
||||
next()
|
||||
goto(name, options, cb)
|
||||
prev()
|
||||
|
||||
MenuModule
|
||||
nextMenu()
|
||||
gotoMenu(name, options, cb)
|
||||
prevMenu()
|
||||
*/
|
||||
|
||||
// :TODO: Clean up client attach/detach/etc.
|
||||
// :TODO: gotoMenuModule() -> MenuModule.gotoMenu()
|
||||
// :TODO: fallbackMenuModule() -> MenuModule.prevMenu()
|
||||
|
||||
module.exports = MenuStack;
|
||||
|
||||
function MenuStack(client) {
|
||||
|
|
|
@ -37,14 +37,14 @@ function login(callingMenu, formData, extraArgs) {
|
|||
}
|
||||
|
||||
setTimeout(function timeout() {
|
||||
client.fallbackMenuModule();
|
||||
callingMenu.prevMenu();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
return;
|
||||
} else {
|
||||
// Other error
|
||||
client.fallbackMenuModule();
|
||||
callingMenu.prevMenu();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
@ -45,7 +45,7 @@ function UserConfigModule(options) {
|
|||
this.menuMethods = {
|
||||
exitKeyPressed : function(formData, extraArgs) {
|
||||
// :TODO: save/etc.
|
||||
self.client.fallbackMenuModule();
|
||||
self.prevMenu();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue