mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-24 14:46:48 +09:00
Polish banned states and confirm
This commit is contained in:
1 parent
30fe6ab121
commit
c8ac878353
5 files changed
+30
-7
No files matched your search
@@ -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 %>
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user