Files
sure/app/views/shared/notifications/_notice.html.erb
neo773 04ee1e73be Fix dark mode support and improve notification/MFA UI (#2126)
* Fix dark mode support and improve notification/MFA UI"

* hide auth tabs on mfa/verify
2025-04-18 13:56:44 -05:00

49 lines
2.1 KiB
Plaintext

<%# locals: (message:, description: nil, cta: nil) %>
<%= tag.div class: "relative flex gap-3 rounded-lg bg-container-inset p-4 group w-full md:max-w-80 shadow-border-xs",
data: {
controller: "element-removal",
action: "animationend->element-removal#remove"
} do %>
<div class="h-5 w-5 shrink-0 p-px text-primary">
<div class="flex h-full items-center justify-center rounded-full bg-success">
<%= lucide_icon "check", class: "w-3 h-3" %>
</div>
</div>
<div class="space-y-4">
<div class="space-y-1">
<%= tag.p message, class: "text-primary text-sm font-medium" %>
<% if description %>
<%= tag.p description, class: "text-secondary text-sm" %>
<% end %>
</div>
<% if cta %>
<%= tag.div class:"flex gap-2 justify-end" do %>
<%= tag.button cta[:decline][:label], class: "btn btn--secondary", data: { action: "click->element-removal#remove" } %>
<%= tag.a cta[:accept][:label], href: cta[:accept][:href], class: "btn btn--primary" %>
<% end %>
<% end %>
</div>
<div class="ml-auto">
<div class="h-5 shrink-0">
<% unless cta %>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="shrink-0">
<path d="M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM3.6 10C3.6 13.5346 6.46538 16.4 10 16.4C13.5346 16.4 16.4 13.5346 16.4 10C16.4 6.46538 13.5346 3.6 10 3.6C6.46538 3.6 3.6 6.46538 3.6 10Z" fill="#E5E5E5" />
<circle class="origin-center -rotate-90 animate-stroke-fill" stroke="#141414" stroke-opacity="0.4" r="7.2" cx="10" cy="10" stroke-dasharray="43.9822971503" stroke-dashoffset="43.9822971503" />
</svg>
<% end %>
</div>
</div>
<% unless cta %>
<div class="absolute -top-2 -right-2">
<%= lucide_icon "x", class: "w-5 h-5 p-0.5 hidden group-hover:inline-block border border-alpha-black-50 border-solid rounded-lg bg-white text-subdued cursor-pointer", data: { action: "click->element-removal#remove" } %>
</div>
<% end %>
<% end %>