1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:25:59 +00:00

add basic local plugin uninstaller

This commit is contained in:
Andrew Dolgov
2021-03-03 19:35:11 +03:00
parent dfdb746a76
commit 0cb719a404
3 changed files with 56 additions and 1 deletions

View File

@@ -349,6 +349,22 @@ const Helpers = {
}
});
},
uninstall: function(plugin) {
const msg = __("Uninstall plugin %s?").replace("%s", plugin);
if (confirm(msg)) {
Notify.progress("Loading, please wait...");
xhr.json("backend.php", {op: "pref-prefs", method: "uninstallPlugin", plugin: plugin}, (reply) => {
if (reply && reply.status == 1)
Helpers.Prefs.refresh();
else {
Notify.error("Plugin uninstallation failed.");
}
});
}
},
install: function() {
const dialog = new fox.SingleUseDialog({
PI_RES_ALREADY_INSTALLED: "PI_RES_ALREADY_INSTALLED",