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 () {
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');

Loading…
Cancel
Save