mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
fixed #1351 -- themes and plugins no longer auto-restart the server
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
"use strict";
|
||||||
|
/* global define, app, socket */
|
||||||
|
|
||||||
define(function() {
|
define(function() {
|
||||||
var Plugins = {
|
var Plugins = {
|
||||||
init: function() {
|
init: function() {
|
||||||
@@ -19,10 +22,13 @@ define(function() {
|
|||||||
app.alert({
|
app.alert({
|
||||||
alert_id: 'plugin_toggled',
|
alert_id: 'plugin_toggled',
|
||||||
title: 'Plugin ' + (status.active ? 'Enabled' : 'Disabled'),
|
title: 'Plugin ' + (status.active ? 'Enabled' : 'Disabled'),
|
||||||
message: 'Restarting your NodeBB <i class="fa fa-refresh fa-spin"></i>',
|
message: 'Please restart your NodeBB to fully ' + (status.active ? 'activate' : 'deactivate') + ' this plugin',
|
||||||
type: 'warning',
|
type: 'info',
|
||||||
timeout: 5000
|
timeout: 5000,
|
||||||
})
|
clickfn: function() {
|
||||||
|
socket.emit('admin.restart');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
pluginsList.append('<li><p><i>No plugins found.</i></p></li>');
|
pluginsList.append('<li><p><i>No plugins found.</i></p></li>');
|
||||||
|
|||||||
@@ -39,10 +39,13 @@ define(['forum/admin/settings'], function(Settings) {
|
|||||||
|
|
||||||
app.alert({
|
app.alert({
|
||||||
alert_id: 'admin:theme',
|
alert_id: 'admin:theme',
|
||||||
type: 'success',
|
type: 'info',
|
||||||
title: 'Theme Changed',
|
title: 'Theme Changed',
|
||||||
message: 'Restarting your NodeBB <i class="fa fa-refresh fa-spin"></i>',
|
message: 'Please restart your NodeBB to fully activate this theme',
|
||||||
timeout: 3500
|
timeout: 5000,
|
||||||
|
clickfn: function() {
|
||||||
|
socket.emit('admin.restart');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ SocketAdmin.themes.set = function(socket, data, callback) {
|
|||||||
widgets.reset(function(err) {
|
widgets.reset(function(err) {
|
||||||
meta.themes.set(data, function() {
|
meta.themes.set(data, function() {
|
||||||
callback();
|
callback();
|
||||||
meta.restart();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -87,7 +86,6 @@ SocketAdmin.themes.set = function(socket, data, callback) {
|
|||||||
SocketAdmin.plugins.toggle = function(socket, plugin_id) {
|
SocketAdmin.plugins.toggle = function(socket, plugin_id) {
|
||||||
plugins.toggleActive(plugin_id, function(status) {
|
plugins.toggleActive(plugin_id, function(status) {
|
||||||
socket.emit('admin.plugins.toggle', status);
|
socket.emit('admin.plugins.toggle', status);
|
||||||
meta.restart();
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user