mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-01 15:34:30 +02:00
* Lots of WIP around menu.json handlinge/etc.
This commit is contained in:
parent
8c9b0e729f
commit
d6ffa2b26e
6 changed files with 162 additions and 42 deletions
48
mods/login.js
Normal file
48
mods/login.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
var ansi = require('../core/ansi_term.js');
|
||||
var art = require('../core/art.js');
|
||||
var user = require('../core/user.js');
|
||||
var theme = require('../core/theme.js');
|
||||
var MenuModule = require('../core/menu_module.js').MenuModule;
|
||||
var ViewController = require('../core/view_controller.js').ViewController;
|
||||
|
||||
//var async = require('async');
|
||||
|
||||
// :TODO: clean up requires
|
||||
|
||||
exports.moduleInfo = {
|
||||
name : 'Login',
|
||||
desc : 'Login Module',
|
||||
author : 'NuSkooler',
|
||||
};
|
||||
|
||||
exports.getModule = LoginModule;
|
||||
|
||||
|
||||
function LoginModule(menuConfig) {
|
||||
MenuModule.call(this, menuConfig);
|
||||
}
|
||||
|
||||
require('util').inherits(LoginModule, MenuModule);
|
||||
|
||||
LoginModule.prototype.enter = function(client) {
|
||||
LoginModule.super_.prototype.enter.call(this, client);
|
||||
};
|
||||
|
||||
LoginModule.prototype.beforeArt = function() {
|
||||
LoginModule.super_.prototype.beforeArt.call(this);
|
||||
|
||||
this.client.term.write(ansi.resetScreen());
|
||||
};
|
||||
|
||||
LoginModule.prototype.mciReady = function(mciMap) {
|
||||
LoginModule.super_.prototype.mciReady.call(this, mciMap);
|
||||
|
||||
var self = this;
|
||||
|
||||
var vc = self.addViewController(new ViewController(self.client));
|
||||
vc.loadFromMCIMapAndConfig( { mciMap : mciMap, menuConfig : self.menuConfig }, function onViewReady(err) {
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue