From 7f2fe465b07c149a7131943215103d9ae0f21b69 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 27 Feb 2021 19:14:13 +0300 Subject: add plugin updates checker into normal updates checker --- js/App.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'js/App.js') diff --git a/js/App.js b/js/App.js index 046365ff8..8eda5ac9d 100644 --- a/js/App.js +++ b/js/App.js @@ -812,10 +812,23 @@ const App = { .then((reply) => { console.log('update reply', reply); - if (reply.id) { - App.byId("updates-available").show(); + const icon = App.byId("updates-available"); + + if (reply.changeset.id || reply.plugins.length > 0) { + icon.show(); + + const tips = []; + + if (reply.changeset.id) + tips.push(__("Updates for Tiny Tiny RSS are available.")); + + if (reply.plugins.length > 0) + tips.push(__("Updates for some local plugins are available.")); + + icon.setAttribute("title", tips.join("\n")); + } else { - App.byId("updates-available").hide(); + icon.hide(); } }); }, -- cgit v1.2.3