v1.18.x
psychobunny 10 years ago
parent a9035f166b
commit 0150e0e063

@ -97,5 +97,7 @@
"follow_topics_you_create": "Follow topics you create",
"grouptitle": "Select the group title you would like to display",
"no-group-title": "No group title"
"no-group-title": "No group title",
"select-skin": "Select a Skin"
}

@ -424,6 +424,82 @@ accountsController.accountSettings = function(req, res, next) {
{value: 'month', name: '[[user:digest_monthly]]', selected: 'month' === userData.settings.dailyDigestFreq}
];
userData.bootswatchSkinOptions = [
{
"name": "Default",
"value": "default"
},
{
"name": "Cerulean",
"value": "cerulean"
},
{
"name": "Cosmo",
"value": "cosmo"
},
{
"name": "Cyborg",
"value": "cyborg"
},
{
"name": "Darkly",
"value": "darkly"
},
{
"name": "Flatly",
"value": "flatly"
},
{
"name": "Journal",
"value": "journal"
},
{
"name": "Lumen",
"value": "lumen"
},
{
"name": "Paper",
"value": "paper"
},
{
"name": "Readable",
"value": "readable"
},
{
"name": "Sandstone",
"value": "sandstone"
},
{
"name": "Simplex",
"value": "simplex"
},
{
"name": "Slate",
"value": "slate"
},
{
"name": "Spacelab",
"value": "spacelab"
},
{
"name": "Superhero",
"value": "superhero"
},
{
"name": "United",
"value": "united"
},
{
"name": "Yeti",
"value": "yeti"
}
];
userData.bootswatchSkinOptions.forEach(function(skin) {
skin.selected = skin.value === userData.settings.bootswatchSkin;
});
userData.userGroups.forEach(function(group) {
group.selected = group.name === userData.settings.groupTitle;
});

@ -243,6 +243,11 @@ middleware.renderHeader = function(req, res, callback) {
if (err) {
return next(err);
}
if (settings.bootswatchSkin && settings.bootswatchSkin !== 'default') {
templateValues.bootswatchCSS = '//maxcdn.bootstrapcdn.com/bootswatch/latest/' + settings.bootswatchSkin + '/bootstrap.min.css';
}
meta.title.build(req.url.slice(1), settings.userLang, next);
});
} else {

@ -75,6 +75,7 @@ module.exports = function(User) {
settings.sendPostNotifications = parseInt(settings.sendPostNotifications, 10) === 1;
settings.restrictChat = parseInt(settings.restrictChat, 10) === 1;
settings.topicSearchEnabled = parseInt(settings.topicSearchEnabled, 10) === 1;
settings.bootswatchSkin = settings.bootswatchSkin || 'default';
callback(null, settings);
});
@ -107,6 +108,7 @@ module.exports = function(User) {
sendPostNotifications: data.sendPostNotifications,
restrictChat: data.restrictChat,
topicSearchEnabled: data.topicSearchEnabled,
bootswatchSkin: data.bootswatchSkin,
groupTitle: data.groupTitle
}, next);
},

Loading…
Cancel
Save