summaryrefslogtreecommitdiff
path: root/js/PrefHelpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/PrefHelpers.js')
-rw-r--r--js/PrefHelpers.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index 30a4544fe..c0fff66c9 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -363,8 +363,15 @@ const Helpers = {
xhr.json("backend.php", {op: "pref-prefs", method: "getPluginsList"}, (reply) => {
this._list_of_plugins = reply;
this.render_contents();
+ }, (e) => {
+ this.render_error(e);
});
},
+ render_error: function(e) {
+ const container = document.querySelector(".prefs-plugin-list");
+
+ container.innerHTML = `<li class='text-error'>${__("Error while loading plugins list: %s.").replace("%s", e)}</li>`;
+ },
render_contents: function() {
const container = document.querySelector(".prefs-plugin-list");
@@ -450,7 +457,7 @@ const Helpers = {
xhr.json("backend.php", {op: "pref-prefs", method: "uninstallPlugin", plugin: plugin}, (reply) => {
if (reply && reply.status == 1)
- Helpers.Prefs.refresh();
+ Helpers.Plugins.reload();
else {
Notify.error("Plugin uninstallation failed.");
}