From 5692777652a28ee66463fa4a4b79928fd90c79fc Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 3 Aug 2026 18:08:58 +0200 Subject: Share one flag stack between the account roster and the events list --- app/views/users/_user.html.erb | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb index aa65cc3d..be92ad1d 100644 --- a/app/views/users/_user.html.erb +++ b/app/views/users/_user.html.erb @@ -1,28 +1,19 @@ <% users.each do |user| %> - + <% if user.otp_enrolled? %> - " aria-label="<%= t(".otp_enrolled") %>"> - <%= icon("shield-check", library: "tabler", "aria-hidden": true) %> - + <%= flag("shield-check", t(".otp_enrolled")) %> <% elsif user.otp_pending_secret.present? %> - " aria-label="<%= t(".otp_pending") %>"> - <%= icon("shield-half", library: "tabler", "aria-hidden": true) %> - + <%= flag("shield-half", t(".otp_pending"), :tier => :attention) %> <% else %> - " aria-label="<%= t(".otp_missing") %>"> - <%= icon("shield-off", library: "tabler", "aria-hidden": true) %> - + <%= flag("shield-off", t(".otp_missing"), :tier => :attention) %> <% end %> <% if (tier = user.staleness_tier) %> <% hint = tier == :never ? t(".stale_never") - : t(".stale_#{tier}", :year => user.last_login_at.year) %> - - <%= icon(tier == :amber ? "clock-exclamation" : "alert-triangle", - library: "tabler", "aria-hidden": true) %> - + : t(".stale_#{tier}", :year => user.last_login_at.year) %> + <%= flag(tier == :amber ? "clock-exclamation" : "alert-triangle", hint, + :tier => tier == :amber ? :attention : :alert) %> <% end %> <%= user.login %> -- cgit v1.3