* Fix version to represent alpha
* Some fixes to message areas * New NU-MAYA prompt
This commit is contained in:
parent
df477667b0
commit
68b8af7975
|
@ -10,6 +10,7 @@ var _ = require('lodash');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
|
||||||
exports.getAvailableMessageAreas = getAvailableMessageAreas;
|
exports.getAvailableMessageAreas = getAvailableMessageAreas;
|
||||||
|
exports.getDefaultMessageArea = getDefaultMessageArea;
|
||||||
exports.getMessageAreaByName = getMessageAreaByName;
|
exports.getMessageAreaByName = getMessageAreaByName;
|
||||||
exports.changeMessageArea = changeMessageArea;
|
exports.changeMessageArea = changeMessageArea;
|
||||||
exports.getMessageListForArea = getMessageListForArea;
|
exports.getMessageListForArea = getMessageListForArea;
|
||||||
|
@ -20,6 +21,10 @@ function getAvailableMessageAreas() {
|
||||||
return Config.messages.areas;
|
return Config.messages.areas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDefaultMessageArea() {
|
||||||
|
return getAvailableMessageAreas()[0];
|
||||||
|
}
|
||||||
|
|
||||||
function getMessageAreaByName(areaName) {
|
function getMessageAreaByName(areaName) {
|
||||||
areaName = areaName.toLowerCase();
|
areaName = areaName.toLowerCase();
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
/* jslint node: true */
|
/* jslint node: true */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var ansi = require('../core/ansi_term.js');
|
var ansi = require('../core/ansi_term.js');
|
||||||
var art = require('../core/art.js');
|
var art = require('../core/art.js');
|
||||||
var user = require('../core/user.js');
|
var user = require('../core/user.js');
|
||||||
var theme = require('../core/theme.js');
|
var theme = require('../core/theme.js');
|
||||||
var Log = require('../core/logger.js').log;
|
var Log = require('../core/logger.js').log;
|
||||||
var MenuModule = require('../core/menu_module.js').MenuModule;
|
var MenuModule = require('../core/menu_module.js').MenuModule;
|
||||||
var ViewController = require('../core/view_controller.js').ViewController;
|
var ViewController = require('../core/view_controller.js').ViewController;
|
||||||
var Config = require('../core/config.js').config;
|
var Config = require('../core/config.js').config;
|
||||||
|
var sysMenuMethod = require('../core/system_menu_method.js');
|
||||||
|
var getDefaultMessageArea = require('../core/message_area.js').getDefaultMessageArea;
|
||||||
|
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
|
|
||||||
exports.submitApplication = submitApplication;
|
exports.submitApplication = submitApplication;
|
||||||
|
|
||||||
|
@ -85,14 +87,16 @@ function submitApplication(callingMenu, formData, extraArgs) {
|
||||||
newUser.username = formData.value.username;
|
newUser.username = formData.value.username;
|
||||||
|
|
||||||
newUser.properties = {
|
newUser.properties = {
|
||||||
real_name : formData.value.realName,
|
real_name : formData.value.realName,
|
||||||
birthdate : new Date(Date.parse(formData.value.birthdate)).toISOString(),
|
birthdate : new Date(Date.parse(formData.value.birthdate)).toISOString(),
|
||||||
sex : formData.value.sex,
|
sex : formData.value.sex,
|
||||||
location : formData.value.location,
|
location : formData.value.location,
|
||||||
affiliation : formData.value.affils,
|
affiliation : formData.value.affils,
|
||||||
email_address : formData.value.email,
|
email_address : formData.value.email,
|
||||||
web_address : formData.value.web,
|
web_address : formData.value.web,
|
||||||
account_created : new Date().toISOString(),
|
account_created : new Date().toISOString(),
|
||||||
|
|
||||||
|
message_area_name : getDefaultMessageArea().name,
|
||||||
|
|
||||||
// :TODO: This is set in User.create() -- proabbly don't need it here:
|
// :TODO: This is set in User.create() -- proabbly don't need it here:
|
||||||
//account_status : Config.users.requireActivation ? user.User.AccountStatus.inactive : user.User.AccountStatus.active,
|
//account_status : Config.users.requireActivation ? user.User.AccountStatus.inactive : user.User.AccountStatus.active,
|
||||||
|
@ -118,7 +122,11 @@ function submitApplication(callingMenu, formData, extraArgs) {
|
||||||
if(user.User.AccountStatus.inactive === client.user.properties.account_status) {
|
if(user.User.AccountStatus.inactive === client.user.properties.account_status) {
|
||||||
client.gotoMenuModule( { name : extraArgs.inactive } );
|
client.gotoMenuModule( { name : extraArgs.inactive } );
|
||||||
} else {
|
} else {
|
||||||
client.gotoMenuModule( { name : menuConfig.next } );
|
//
|
||||||
|
// If active now, we need to call login() to authenticate
|
||||||
|
//
|
||||||
|
sysMenuMethod.login(callingMenu, formData, extraArgs);
|
||||||
|
// client.gotoMenuModule( { name : menuConfig.next } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"menuCommand" : {
|
"menuCommand" : {
|
||||||
"art" : "menu_prompt.ans",
|
art: MNUPRMT
|
||||||
"mci" : {
|
"mci" : {
|
||||||
"ET2" : {
|
"ET2" : {
|
||||||
"argName" : "command",
|
"argName" : "command",
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "enigma-bbs",
|
"name" : "enigma-bbs",
|
||||||
"version" : "0.0.1-beta",
|
"version" : "0.0.1-alpha",
|
||||||
"description" : "ENiGMA½ Bulletin Board System",
|
"description" : "ENiGMA½ Bulletin Board System",
|
||||||
"author" : "Bryan Ashby <bryan@l33t.codes>",
|
"author" : "Bryan Ashby <bryan@l33t.codes>",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
|
|
Loading…
Reference in New Issue