feat(ui): show new version that is available instead of general message

This commit is contained in:
Folke Lemaitre 2022-12-31 16:01:59 +01:00
parent a9de5910f2
commit 34e2c78e06
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 20 additions and 11 deletions

View file

@ -345,10 +345,17 @@ function M:diagnostics(plugin)
message = "updated from " .. plugin._.updated.from:sub(1, 7) .. " to " .. plugin._.updated.to:sub(1, 7),
})
end
elseif plugin._.has_updates then
self:diagnostic({
message = "updates available",
})
elseif plugin._.updates then
local version = plugin._.updates.to.version
if version then
self:diagnostic({
message = "version " .. tostring(version) .. " is available",
})
else
self:diagnostic({
message = "updates available",
})
end
end
for _, task in ipairs(plugin._.tasks or {}) do
if task:is_running() then