mirror of
https://github.com/we-promise/sure.git
synced 2026-05-28 06:54:56 +00:00
Lifts the per-panel status indicator up to each collapsed accordion header so admins can see at a glance which providers are connected without expanding every section. Connected providers sort first. - Add optional status: and meta: locals to settings/_section partial; pill hides via group-open:hidden when the section is expanded - New settings/providers/_status_pill partial (ok/warn/err/off states) - Add SettingsHelper#provider_summary to centralise the connected-vs-not logic already scattered across panel partials - Refactor show.html.erb to pass status to every section and sort family_panels by connection state - Add settings.providers.status.* i18n keys - Add system tests asserting pill renders and sort order https://claude.ai/code/session_01KW2HCN9rP1fiyQuw7Cju9D
14 lines
615 B
Plaintext
14 lines
615 B
Plaintext
<%# locals: (status:) %>
|
|
<%
|
|
dot_class, pill_class = case status.to_sym
|
|
when :ok then [ "bg-success", "bg-success/10 text-success" ]
|
|
when :warn then [ "bg-warning", "bg-warning/10 text-warning" ]
|
|
when :err then [ "bg-destructive", "bg-destructive/10 text-destructive" ]
|
|
else [ "bg-gray-400", "bg-gray-100 text-secondary" ]
|
|
end
|
|
%>
|
|
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium <%= pill_class %>">
|
|
<span class="w-1.5 h-1.5 rounded-full flex-shrink-0 <%= dot_class %>"></span>
|
|
<%= t("settings.providers.status.#{status}") %>
|
|
</span>
|