|
|
@ -96,8 +96,18 @@ settingsController.get = function(req, res, callback) {
|
|
|
|
{ "name": "Yeti", "value": "yeti" }
|
|
|
|
{ "name": "Yeti", "value": "yeti" }
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var isCustom = true;
|
|
|
|
userData.homePageRoutes.forEach(function(route) {
|
|
|
|
userData.homePageRoutes.forEach(function(route) {
|
|
|
|
route.selected = route.route === userData.settings.homePageRoute;
|
|
|
|
route.selected = route.route === userData.settings.homePageRoute;
|
|
|
|
|
|
|
|
if (route.selected) {
|
|
|
|
|
|
|
|
isCustom = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userData.homePageRoutes.push({
|
|
|
|
|
|
|
|
route: 'custom',
|
|
|
|
|
|
|
|
name: 'Custom',
|
|
|
|
|
|
|
|
selected: isCustom
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
userData.bootswatchSkinOptions.forEach(function(skin) {
|
|
|
|
userData.bootswatchSkinOptions.forEach(function(skin) {
|
|
|
@ -142,12 +152,7 @@ function getHomePageRoutes(callback) {
|
|
|
|
name: 'Category: ' + category.name
|
|
|
|
name: 'Category: ' + category.name
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
next(null, categoryData);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
], function(err, categoryData) {
|
|
|
|
|
|
|
|
if (err) {
|
|
|
|
|
|
|
|
return callback(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
categoryData = categoryData || [];
|
|
|
|
categoryData = categoryData || [];
|
|
|
|
|
|
|
|
|
|
|
|
plugins.fireHook('filter:homepage.get', {routes: [
|
|
|
|
plugins.fireHook('filter:homepage.get', {routes: [
|
|
|
@ -163,19 +168,12 @@ function getHomePageRoutes(callback) {
|
|
|
|
route: 'popular',
|
|
|
|
route: 'popular',
|
|
|
|
name: 'Popular'
|
|
|
|
name: 'Popular'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
].concat(categoryData)}, function(err, data) {
|
|
|
|
].concat(categoryData)}, next);
|
|
|
|
if (err) {
|
|
|
|
},
|
|
|
|
return callback(err);
|
|
|
|
function (data, next) {
|
|
|
|
|
|
|
|
next(null, data.routes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
], callback);
|
|
|
|
data.routes.push({
|
|
|
|
|
|
|
|
route: 'custom',
|
|
|
|
|
|
|
|
name: 'Custom'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
callback(null, data.routes);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|