mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:45:56 +00:00
prefs: properly report failures when loading plugin list
This commit is contained in:
@@ -363,8 +363,15 @@ const Helpers = {
|
|||||||
xhr.json("backend.php", {op: "pref-prefs", method: "getPluginsList"}, (reply) => {
|
xhr.json("backend.php", {op: "pref-prefs", method: "getPluginsList"}, (reply) => {
|
||||||
this._list_of_plugins = reply;
|
this._list_of_plugins = reply;
|
||||||
this.render_contents();
|
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() {
|
render_contents: function() {
|
||||||
const container = document.querySelector(".prefs-plugin-list");
|
const container = document.querySelector(".prefs-plugin-list");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user