add rotate api token button

This commit is contained in:
Pete Matsyburka
2024-01-06 12:34:20 +02:00
parent 7dc342a6f9
commit ab9cc52bcc
3 changed files with 12 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@
<div class="flex flex-row space-x-4">
<input id="api_key" type="text" value="<%= current_user.access_token.token %>" class="input font-mono input-bordered w-full" autocomplete="off" readonly>
<%= render 'shared/clipboard_copy', icon: 'copy', text: current_user.access_token.token, class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy', copied_title: 'Copied' %>
<%= button_to button_title(title: 'Rotate', disabled_with: 'Rotate', icon: svg_icon('reload', class: 'w-6 h-6')), settings_api_index_path, class: 'white-button', data: { turbo_confirm: 'Remove existing API token and generated a new one. Are you sure?' } %>
</div>
</div>
</div>