Install and uninstall plugins with style

- Don't block the whole page when installing a plugin
- allow people to search and install other plugins meanwhile

Why? http://i.imgur.com/XoX6uYS.jpg
This commit is contained in:
Marcel Klehr 2013-03-26 15:11:30 +01:00
parent 981a33f01e
commit 638cea5fd6
4 changed files with 70 additions and 40 deletions

View file

@ -85,14 +85,14 @@ exports.socketio = function (hook_name, args, cb) {
socket.on("install", function (plugin_name) {
installer.install(plugin_name, function (er) {
if(er) console.warn(er)
socket.emit("finished:install", {error: er? er.message : null});
socket.emit("finished:install", {plugin: plugin_name, error: er? er.message : null});
});
});
socket.on("uninstall", function (plugin_name) {
installer.uninstall(plugin_name, function (er) {
if(er) console.warn(er)
socket.emit("finished:uninstall", {error: er? er.message : null});
socket.emit("finished:uninstall", {plugin: plugin_name, error: er? er.message : null});
});
});
});