mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-31 23:16:09 +02:00
* Code cleanup and eslint since -- remove unused variables, clean up RegExs, so on...
This commit is contained in:
parent
a106050ba3
commit
ac1433e84b
112 changed files with 1375 additions and 1898 deletions
|
@ -4,7 +4,7 @@
|
|||
// ENiGMA½
|
||||
const MenuModule = require('./menu_module.js').MenuModule;
|
||||
|
||||
const {
|
||||
const {
|
||||
getModDatabasePath,
|
||||
getTransactionDatabase
|
||||
} = require('./database.js');
|
||||
|
@ -39,7 +39,7 @@ const MciViewIds = {
|
|||
SelectedBBSLoc : 6,
|
||||
SelectedBBSSoftware : 7,
|
||||
SelectedBBSNotes : 8,
|
||||
SelectedBBSSubmitter : 9,
|
||||
SelectedBBSSubmitter : 9,
|
||||
},
|
||||
add : {
|
||||
BBSName : 1,
|
||||
|
@ -49,7 +49,7 @@ const MciViewIds = {
|
|||
Location : 5,
|
||||
Software : 6,
|
||||
Notes : 7,
|
||||
Error : 8,
|
||||
Error : 8,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -190,12 +190,12 @@ exports.getModule = class BBSListModule extends MenuModule {
|
|||
|
||||
drawSelectedEntry(entry) {
|
||||
if(!entry) {
|
||||
Object.keys(SELECTED_MCI_NAME_TO_ENTRY).forEach(mciName => {
|
||||
Object.keys(SELECTED_MCI_NAME_TO_ENTRY).forEach(mciName => {
|
||||
this.setViewText('view', MciViewIds.view[mciName], '');
|
||||
});
|
||||
} else {
|
||||
const youSubmittedFormat = this.menuConfig.youSubmittedFormat || '{submitter} (You!)';
|
||||
|
||||
|
||||
Object.keys(SELECTED_MCI_NAME_TO_ENTRY).forEach(mciName => {
|
||||
const t = entry[SELECTED_MCI_NAME_TO_ENTRY[mciName]];
|
||||
if(MciViewIds.view[mciName]) {
|
||||
|
@ -270,7 +270,7 @@ exports.getModule = class BBSListModule extends MenuModule {
|
|||
(err, row) => {
|
||||
if (!err) {
|
||||
self.entries.push({
|
||||
id : row.id,
|
||||
id : row.id,
|
||||
bbsName : row.bbs_name,
|
||||
sysOp : row.sysop,
|
||||
telnet : row.telnet,
|
||||
|
@ -306,9 +306,9 @@ exports.getModule = class BBSListModule extends MenuModule {
|
|||
|
||||
entriesView.on('index update', idx => {
|
||||
const entry = self.entries[idx];
|
||||
|
||||
|
||||
self.drawSelectedEntry(entry);
|
||||
|
||||
|
||||
if(!entry) {
|
||||
self.selectedBBS = -1;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue