mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
+ Start work on MenuView & friends
* connect.js no longer a module. Part of initial connection always * Cleaner & expandable BBS init * Better theme handling
This commit is contained in:
parent
14a321de2f
commit
c3aa4c44e2
8 changed files with 96 additions and 64 deletions
|
@ -33,15 +33,14 @@ function getThemeInfo(themeID, cb) {
|
|||
var availableThemes = {};
|
||||
|
||||
function initAvailableThemes(cb) {
|
||||
// lazy init
|
||||
async.waterfall(
|
||||
[
|
||||
function getDir(callback) {
|
||||
fs.readdir(Config.paths.themes, function onReadDir(err, files) {
|
||||
fs.readdir(Config.paths.themes, function onReadDir(err, files) {
|
||||
callback(err, files);
|
||||
});
|
||||
},
|
||||
function filterFiles(files, callback) {
|
||||
function filterFiles(files, callback) {
|
||||
var filtered = files.filter(function onFilter(file) {
|
||||
return fs.statSync(paths.join(Config.paths.themes, file)).isDirectory();
|
||||
});
|
||||
|
@ -56,9 +55,9 @@ function initAvailableThemes(cb) {
|
|||
}
|
||||
availableThemes[themeId] = info;
|
||||
}
|
||||
callback(null);
|
||||
});
|
||||
});
|
||||
callback(null);
|
||||
}
|
||||
],
|
||||
function onComplete(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue