Polish banned states and confirm

This commit is contained in:
Jason Zimdars committed 2025-11-26 13:08:35 -06:00
1 parent 30fe6ab121
commit c8ac878353
5 files changed
+30 -7

No files matched your search

+7 -5
View File
@@ -1,13 +1,15 @@
<% if user.active? %>
<%= button_to user_ban_path(user), method: :post,
class: "btn btn--negative full-width",
data: { turbo_confirm: "Are you sure you want to ban this user?" } do %>
Ban user
class: "btn full-width",
data: { turbo_confirm: "Are you sure you want to ban this user? This will log them out, delete their messages, and block their IP addresses." } do %>
<%= image_tag "cancel.svg", aria: { hidden: "true", label: "Ban #{@user.name}" } %>
<span>Ban <%= user.name %></span>
<% end %>
<% else %>
<%= button_to user_ban_path(user), method: :delete,
class: "btn full-width",
class: "btn btn--negative full-width",
data: { turbo_confirm: "Are you sure you want to remove the ban on this user?" } do %>
Remove ban
<%= image_tag "cancel.svg", aria: { hidden: "true", label: "Ban #{@user.name}" } %>
<span>Remove ban</span>
<% end %>
<% end %>
+1 -1
View File
@@ -16,7 +16,7 @@
<% end %>
<section class="panel txt-align-center">
<div class="flex flex-column gap">
<div class="flex flex-column gap <%= "banned" if @user.banned? %>">
<div class="avatar txt-xx-large center" style="background: white">
<%= image_tag fresh_user_avatar_path(@user), alt: "Profile avatar", class: "avatar" %>
</div>