Files
fizzy/app/views/users/credentials/index.html.erb
T
Stanko K.R. 6c58fd9bdd Implement Passkey registration
- Create Identity credentials
- Add management UI and registration flow
2026-03-18 11:48:52 +01:00

35 lines
1.2 KiB
Plaintext

<% @page_title = "Passkeys" %>
<% content_for :header do %>
<div class="header__actions header__actions--start">
<%= back_link_to "My profile", user_path(@user), "keydown.left@document->hotkey#click keydown.esc@document->hotkey#click" %>
</div>
<h1 class="header__title" data-bridge--title-target="header"><%= @page_title %></h1>
<% end %>
<section class="panel panel--wide shadow center">
<% if @credentials.any? %>
<p class="margin-none-block-start">Passkeys let you sign in without email codes. They use your device's biometrics, PIN, or security key.</p>
<table class="access_tokens_table margin-block-end-double max-width txt-small">
<thead>
<tr>
<th>Passkey</th>
<th>Created</th>
<th></th>
</tr>
</thead>
<tbody>
<%= render partial: "users/credentials/credential", collection: @credentials %>
</tbody>
</table>
<% else %>
<p class="margin-none-block-start">Passkeys let you sign in without email codes. They use your device's biometrics, PIN, or security key.</p>
<% end %>
<%= link_to new_user_credential_path(@user), class: "btn btn--link" do %>
<%= icon_tag "add" %>
<span>Add a passkey</span>
<% end %>
</section>