mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Plugin install/uninstall
This commit is contained in:
parent
81250cba15
commit
af96509fbb
2 changed files with 41 additions and 19 deletions
|
@ -32,14 +32,24 @@ exports.socketio = function (hook_name, args, cb) {
|
|||
});
|
||||
});
|
||||
|
||||
socket.on("install", function (query) {
|
||||
socket.on("install", function (plugin_name) {
|
||||
socket.emit("progress", {progress:0, message:'Downloading and installing ' + plugin_name + "..."});
|
||||
installer.install(plugin_name, function (er) {
|
||||
if (er)
|
||||
socket.emit("progress", {progress:1, error:er});
|
||||
else
|
||||
socket.emit("progress", {progress:1, message:'Done.'});
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("uninstall", function (query) {
|
||||
socket.on("uninstall", function (plugin_name) {
|
||||
socket.emit("progress", {progress:0, message:'Uninstalling ' + plugin_name + "..."});
|
||||
installer.uninstall(plugin_name, function (er) {
|
||||
if (er)
|
||||
socket.emit("progress", {progress:1, error:er});
|
||||
else
|
||||
socket.emit("progress", {progress:1, message:'Done.'});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue