mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-08 00:22:51 +01:00
feat: bring back noskin option
if forum sets a default skin there was no way for the user to go back to the no skin version
This commit is contained in:
@@ -98,7 +98,7 @@ apiController.loadConfig = async function (req) {
|
||||
}
|
||||
|
||||
// Handle old skin configs
|
||||
const oldSkins = ['noskin', 'default'];
|
||||
const oldSkins = ['default'];
|
||||
settings.bootswatchSkin = oldSkins.includes(settings.bootswatchSkin) ? '' : settings.bootswatchSkin;
|
||||
|
||||
config.usePagination = settings.usePagination;
|
||||
@@ -113,7 +113,14 @@ apiController.loadConfig = async function (req) {
|
||||
config.categoryTopicSort = settings.categoryTopicSort || config.categoryTopicSort;
|
||||
config.topicSearchEnabled = settings.topicSearchEnabled || false;
|
||||
config.disableCustomUserSkins = meta.config.disableCustomUserSkins === 1;
|
||||
config.bootswatchSkin = (meta.config.disableCustomUserSkins !== 1 && settings.bootswatchSkin && settings.bootswatchSkin !== '') ? settings.bootswatchSkin : '';
|
||||
config.defaultBootswatchSkin = config.bootswatchSkin;
|
||||
if (!config.disableCustomUserSkins && settings.bootswatchSkin) {
|
||||
if (settings.bootswatchSkin === 'noskin') {
|
||||
config.bootswatchSkin = '';
|
||||
} else if (settings.bootswatchSkin !== '') {
|
||||
config.bootswatchSkin = settings.bootswatchSkin;
|
||||
}
|
||||
}
|
||||
|
||||
// Overrides based on privilege
|
||||
config.disableChatMessageEditing = isAdminOrGlobalMod ? false : config.disableChatMessageEditing;
|
||||
|
||||
Reference in New Issue
Block a user