diff options
author | Andrew Dolgov <[email protected]> | 2021-02-27 19:14:13 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-27 19:14:13 +0300 |
commit | 7f2fe465b07c149a7131943215103d9ae0f21b69 (patch) | |
tree | 1758069a5d09c9a67fd65ab9d7742be72be9a59d /js | |
parent | d821e4b090a30d1d2dba2cba27d9c944210d195c (diff) |
add plugin updates checker into normal updates checker
Diffstat (limited to 'js')
-rw-r--r-- | js/App.js | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -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(); } }); }, |