mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
issue #427 - proper handling of theme reverting
This commit is contained in:
@@ -47,9 +47,17 @@ define(function() {
|
|||||||
revertEl.addEventListener('click', function() {
|
revertEl.addEventListener('click', function() {
|
||||||
bootbox.confirm('Are you sure you wish to remove the custom theme and restore the NodeBB default theme?', function(confirm) {
|
bootbox.confirm('Are you sure you wish to remove the custom theme and restore the NodeBB default theme?', function(confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
require(['forum/admin/settings'], function(Settings) {
|
socket.emit('api:admin.theme.set', {
|
||||||
Settings.remove('theme:id');
|
type: 'local',
|
||||||
Settings.remove('theme:src');
|
id: 'nodebb-theme-cerulean'
|
||||||
|
}, function(err) {
|
||||||
|
app.alert({
|
||||||
|
alert_id: 'admin:theme',
|
||||||
|
type: 'success',
|
||||||
|
title: 'Theme Changed',
|
||||||
|
message: 'You have successfully reverted your NodeBB back to it\'s default theme. Please restart to see the changes.',
|
||||||
|
timeout: 3500
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user