mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-05 01:11:36 +02:00
Standardization work on built in user list module plus docs & code cleanup
* More docs, fix some info * Code cleanup
This commit is contained in:
parent
2e275600b1
commit
e6a812cf34
9 changed files with 102 additions and 80 deletions
|
@ -38,13 +38,13 @@ exports.getModule = class WhosOnlineModule extends MenuModule {
|
|||
return this.prepViewController('online', 0, mciData.menu, next);
|
||||
},
|
||||
(next) => {
|
||||
const onlineListView = this.viewControllers.online.getView(MciViewIds.OnlineList);
|
||||
const onlineListView = this.viewControllers.online.getView(MciViewIds.onlineList);
|
||||
if(!onlineListView) {
|
||||
return cb(Errors.MissingMci(`Missing online list MCI ${MciViewIds.OnlineList}`));
|
||||
return cb(Errors.MissingMci(`Missing online list MCI ${MciViewIds.onlineList}`));
|
||||
}
|
||||
|
||||
const onlineList = getActiveNodeList(true).slice(0, onlineListView.height).map(
|
||||
oe => Object.assign(oe, { timeOn : _.upperFirst(oe.timeOn.humanize()) })
|
||||
oe => Object.assign(oe, { text : oe.userName, timeOn : _.upperFirst(oe.timeOn.humanize()) })
|
||||
);
|
||||
|
||||
onlineListView.setItems(onlineList);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue