mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
closes #3069
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user