mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 07:40:43 +01:00
fix persona defaults
fix missing theme:id
This commit is contained in:
@@ -46,20 +46,20 @@ define('admin/appearance/themes', ['bootbox', 'translator', 'alerts'], function
|
||||
});
|
||||
|
||||
$('#revert_theme').on('click', function () {
|
||||
if (config['theme:id'] === 'nodebb-theme-persona') {
|
||||
if (config['theme:id'] === 'nodebb-theme-harmony') {
|
||||
return;
|
||||
}
|
||||
bootbox.confirm('[[admin/appearance/themes:revert-confirm]]', function (confirm) {
|
||||
if (confirm) {
|
||||
socket.emit('admin.themes.set', {
|
||||
type: 'local',
|
||||
id: 'nodebb-theme-persona',
|
||||
id: 'nodebb-theme-harmony',
|
||||
}, function (err) {
|
||||
if (err) {
|
||||
return alerts.error(err);
|
||||
}
|
||||
config['theme:id'] = 'nodebb-theme-persona';
|
||||
highlightSelectedTheme('nodebb-theme-persona');
|
||||
config['theme:id'] = 'nodebb-theme-harmony';
|
||||
highlightSelectedTheme('nodebb-theme-harmony');
|
||||
alerts.alert({
|
||||
alert_id: 'admin:theme',
|
||||
type: 'success',
|
||||
|
||||
@@ -65,7 +65,7 @@ helpers.buildBodyClass = function (req, res, templateData = {}) {
|
||||
|
||||
parts.push(`page-status-${res.statusCode}`);
|
||||
|
||||
parts.push(`theme-${meta.config['theme:id'].split('-')[2]}`);
|
||||
parts.push(`theme-${(meta.config['theme:id'] || '').split('-')[2]}`);
|
||||
|
||||
if (req.loggedIn) {
|
||||
parts.push('user-loggedin');
|
||||
|
||||
Reference in New Issue
Block a user