mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
closes #3069
This commit is contained in:
@@ -97,5 +97,7 @@
|
|||||||
"follow_topics_you_create": "Follow topics you create",
|
"follow_topics_you_create": "Follow topics you create",
|
||||||
|
|
||||||
"grouptitle": "Select the group title you would like to display",
|
"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}
|
{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) {
|
userData.userGroups.forEach(function(group) {
|
||||||
group.selected = group.name === userData.settings.groupTitle;
|
group.selected = group.name === userData.settings.groupTitle;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -243,6 +243,11 @@ middleware.renderHeader = function(req, res, callback) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
return next(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);
|
meta.title.build(req.url.slice(1), settings.userLang, next);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ module.exports = function(User) {
|
|||||||
settings.sendPostNotifications = parseInt(settings.sendPostNotifications, 10) === 1;
|
settings.sendPostNotifications = parseInt(settings.sendPostNotifications, 10) === 1;
|
||||||
settings.restrictChat = parseInt(settings.restrictChat, 10) === 1;
|
settings.restrictChat = parseInt(settings.restrictChat, 10) === 1;
|
||||||
settings.topicSearchEnabled = parseInt(settings.topicSearchEnabled, 10) === 1;
|
settings.topicSearchEnabled = parseInt(settings.topicSearchEnabled, 10) === 1;
|
||||||
|
settings.bootswatchSkin = settings.bootswatchSkin || 'default';
|
||||||
|
|
||||||
callback(null, settings);
|
callback(null, settings);
|
||||||
});
|
});
|
||||||
@@ -107,6 +108,7 @@ module.exports = function(User) {
|
|||||||
sendPostNotifications: data.sendPostNotifications,
|
sendPostNotifications: data.sendPostNotifications,
|
||||||
restrictChat: data.restrictChat,
|
restrictChat: data.restrictChat,
|
||||||
topicSearchEnabled: data.topicSearchEnabled,
|
topicSearchEnabled: data.topicSearchEnabled,
|
||||||
|
bootswatchSkin: data.bootswatchSkin,
|
||||||
groupTitle: data.groupTitle
|
groupTitle: data.groupTitle
|
||||||
}, next);
|
}, next);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user