fix persona defaults

fix missing theme:id
isekai-main
Barış Soner Uşaklı 2 years ago
parent f1170b1896
commit e8b40b5884

@ -46,20 +46,20 @@ define('admin/appearance/themes', ['bootbox', 'translator', 'alerts'], function
}); });
$('#revert_theme').on('click', function () { $('#revert_theme').on('click', function () {
if (config['theme:id'] === 'nodebb-theme-persona') { if (config['theme:id'] === 'nodebb-theme-harmony') {
return; return;
} }
bootbox.confirm('[[admin/appearance/themes:revert-confirm]]', function (confirm) { bootbox.confirm('[[admin/appearance/themes:revert-confirm]]', function (confirm) {
if (confirm) { if (confirm) {
socket.emit('admin.themes.set', { socket.emit('admin.themes.set', {
type: 'local', type: 'local',
id: 'nodebb-theme-persona', id: 'nodebb-theme-harmony',
}, function (err) { }, function (err) {
if (err) { if (err) {
return alerts.error(err); return alerts.error(err);
} }
config['theme:id'] = 'nodebb-theme-persona'; config['theme:id'] = 'nodebb-theme-harmony';
highlightSelectedTheme('nodebb-theme-persona'); highlightSelectedTheme('nodebb-theme-harmony');
alerts.alert({ alerts.alert({
alert_id: 'admin:theme', alert_id: 'admin:theme',
type: 'success', type: 'success',

@ -65,7 +65,7 @@ helpers.buildBodyClass = function (req, res, templateData = {}) {
parts.push(`page-status-${res.statusCode}`); 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) { if (req.loggedIn) {
parts.push('user-loggedin'); parts.push('user-loggedin');

Loading…
Cancel
Save