mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
* Add ability to delete invite codes Implemented destroy action in InviteCodesController and updated routes to support invite code deletion. Updated invite code partial to include a delete button and improved styling. Also refactored the generate tokens button in invite code settings to use DS::Button. * Show advanced settings only to admin users Updated the settings navigation to display the advanced section only for admin users. Also improved handling of hidden elements in the invite code CSS.
22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
<%# app/views/invite_codes/_invite_code.html.erb %>
|
|
<div class="invite_code pt-2">
|
|
<div class="flex items-center justify-between p-2 w-1/2 bg-inverse rounded-md" data-controller="clipboard">
|
|
<div>
|
|
<span data-clipboard-target="source" class="text-inverse text-sm font-medium"><%= invite_code.token %></span>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<button data-action="clipboard#copy" class="shrink-0 z-10 inline-flex items-center px-1 text-sm text-secondary font-sm text-center" type="button">
|
|
<span data-clipboard-target="iconDefault">
|
|
<%= icon "copy" %>
|
|
</span>
|
|
<span class="hidden inline-flex items-center" data-clipboard-target="iconSuccess">
|
|
<%= icon "check" %>
|
|
</span>
|
|
</button>
|
|
<%= button_to invite_code_path(invite_code), method: :delete, data: { confirm: "Are you sure?" }, class: "ml-2 text-red-600 text-xs" do %>
|
|
<%= icon("trash-2", size: "sm", class: "inline mr-1") %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|