Files
sure/app/views/pages/redis_configuration_error.html.erb
Guillem Arias Fauste 211e407456 fix(ds): migrate remaining amber notice boxes to DS::Alert(:warning) (#2247)
Continues the #2198 warning consolidation (after the SSO surfaces).
Replaces the last hand-rolled bg-amber-50 notice boxes with DS::Alert:

- pages/redis_configuration_error: "why Redis is required" callout →
  DS::Alert(title:, message:, variant: :warning).
- family_exports/new: export "Note" callout → DS::Alert(title:, message:).
- sessions/new: "no auth methods enabled" notice → DS::Alert(message:).

The DS::Alert warning recipe (warning tint + neutral text + alert-triangle)
replaces the literal amber palette while preserving each notice's intent.

Part of #2198. After this, the only remaining raw amber-* is the dynamic
validation feedback in admin_sso_form_controller.js (deferred — JS form
state styling, a separate concern).
2026-06-11 15:25:33 +02:00

54 lines
1.9 KiB
Plaintext

<% content_for :title, t(".page_title") %>
<div class="flex items-center justify-center h-full p-4 sm:p-6 lg:p-8">
<div class="w-full max-w-md sm:max-w-lg lg:max-w-2xl">
<div class="bg-container border border-primary rounded-xl p-6 sm:p-8 shadow-sm">
<!-- Icon and Header -->
<div class="text-center mb-8">
<div class="mx-auto w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4">
<%= icon "alert-triangle", class: "w-8 h-8 text-red-600" %>
</div>
<h1 class="text-xl sm:text-2xl font-bold text-primary mb-2"><%= t(".heading") %></h1>
<p class="text-sm sm:text-base text-subdued"><%= t(".subheading") %></p>
</div>
<!-- Explanation -->
<div class="mb-8">
<div class="mb-6">
<%= render DS::Alert.new(title: t(".why_required_title"), message: t(".why_required_body"), variant: :warning) %>
</div>
<!-- Primary CTA -->
<div class="text-center space-y-4">
<%= render DS::Link.new(
text: t(".view_setup_guide"),
href: "https://github.com/we-promise/sure/blob/main/docs/hosting/docker.md",
variant: "primary",
size: "lg",
icon: "external-link",
full_width: true,
target: "_blank",
rel: "noopener noreferrer"
) %>
<p class="text-sm text-subdued"><%= t(".setup_guide_hint") %></p>
</div>
</div>
<!-- Secondary CTA -->
<div class="pt-6 border-t border-primary">
<div class="text-center space-y-3">
<p class="text-sm text-subdued"><%= t(".refresh_hint") %></p>
<%= render DS::Button.new(
text: t(".refresh_page"),
variant: "secondary",
icon: "refresh-cw",
type: "button",
full_width: true,
onclick: "window.location.reload()"
) %>
</div>
</div>
</div>
</div>
</div>