Add “Update available” navigation item at top of navbar when new Mastodon versions are available (#39705)

This commit is contained in:
Claire committed 2026-07-03 14:38:32 +02:00
1 parent 7db2a99504
commit f4cdbb9015
5 files changed
+12 -3

No files matched your search

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h200v80H160v480h640v-480H600v-80h200q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-184L280-544l56-56 104 104v-304h80v304l104-104 56 56-200 200Z"/></svg>

After

Width:  |  Height:  |  Size: 321 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h200v80H160v480h640v-480H600v-80h200q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-184L280-544l56-56 104 104v-304h80v304l104-104 56 56-200 200Z"/></svg>

After

Width:  |  Height:  |  Size: 321 B

+4
View File
@@ -47,6 +47,10 @@ class SoftwareUpdate < ApplicationRecord
all.to_a.filter(&:pending?)
end
def pending?
pending_to_a.present?
end
def urgent_pending?
pending_to_a.any?(&:urgent?)
end