fix(ds): migrate SSO amber warning surfaces to DS::Alert / DS::Pill (#2246)

Apply the resolved warning-hue decision (use --color-warning; no separate
amber token) to the admin SSO surfaces flagged in #2198:

- admin/sso_providers: the "legacy providers" notice → DS::Alert(:warning);
  the "ENV configured" badge → DS::Pill(tone: :warning).
- settings/securities: the single-OIDC password warning → DS::Alert(:warning).

Replaces hand-rolled bg-amber-50 / border-amber-200 / text-amber-800 boxes
and an amber badge with the functional warning token via DS components. The
DS::Alert warning recipe (warning tint + neutral text + alert-triangle)
matches the prior look while clearing the literal-token drift.

Part of #2198.
This commit is contained in:
Guillem Arias Fauste
2026-06-11 15:24:02 +02:00
committed by GitHub
parent c05a64ee9b
commit c45b786e86
2 changed files with 5 additions and 15 deletions

View File

@@ -64,13 +64,8 @@
<% if @legacy_providers.any? %>
<%= settings_section title: t("admin.sso_providers.index.legacy_providers_title"), collapsible: true, open: true do %>
<div class="bg-amber-50 border border-amber-200 rounded-lg p-3 mb-4 theme-dark:bg-amber-500/10 theme-dark:border-amber-500/30">
<div class="flex gap-2">
<%= icon "alert-triangle", class: "w-5 h-5 text-amber-600 shrink-0 theme-dark:text-amber-400" %>
<p class="text-sm text-amber-800 theme-dark:text-amber-200">
<%= t("admin.sso_providers.index.legacy_providers_notice") %>
</p>
</div>
<div class="mb-4">
<%= render DS::Alert.new(message: t("admin.sso_providers.index.legacy_providers_notice"), variant: :warning) %>
</div>
<div class="divide-y divide-alpha-black-200 theme-dark:divide-alpha-white-200">
@@ -90,9 +85,7 @@
</div>
</div>
<div class="flex items-center gap-2">
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-amber-100 text-amber-800 theme-dark:bg-amber-500/15 theme-dark:text-amber-200">
<%= t("admin.sso_providers.index.env_configured") %>
</span>
<%= render DS::Pill.new(label: t("admin.sso_providers.index.env_configured"), tone: :warning, marker: false) %>
</div>
</div>
<% end %>

View File

@@ -160,11 +160,8 @@
<% end %>
</div>
<% if @oidc_identities.count == 1 && Current.user.password_digest.blank? %>
<div class="mt-4 p-3 bg-amber-50 border border-amber-200 rounded-lg theme-dark:bg-amber-500/10 theme-dark:border-amber-500/30">
<div class="flex items-start gap-2">
<%= icon "alert-triangle", class: "w-5 h-5 text-amber-600 shrink-0 mt-0.5 theme-dark:text-amber-400" %>
<p class="text-sm text-amber-800 theme-dark:text-amber-200"><%= t(".sso_warning_message") %></p>
</div>
<div class="mt-4">
<%= render DS::Alert.new(message: t(".sso_warning_message"), variant: :warning) %>
</div>
<% end %>
<% else %>