<% if Current.user == @user %>
<%= link_to user_credentials_path(@user), class: "user-edit-link btn", style: "inset: 0 auto auto 0", data: { controller: "tooltip" } do %>
🔑
Manage passkeys
<% end %>
<%= link_to edit_user_path(@user), class: "user-edit-link btn", data: { controller: "tooltip" } do %>
<%= icon_tag "pencil" %>
Edit profile
<% end %>
<% end %>
<%= image_tag user_avatar_path(@user), alt: "Profile avatar for #{@user.name}" %>
<%= @user.name %>
<% if !@user.active? %>
<%= @user.name %> is no longer on this account
<% elsif !@user.verified? %>
Unverified
A sign-in code has been sent to this email address, but the user has not yet logged in to confirm their identity.
<% else %>
<%= mail_to @user.identity.email_address %>
<% end %>
<% if @user.verified? %>
<%= link_to "Which cards are assigned to #{me_or_you}?",
cards_path(assignee_ids: [ @user.id ], sorted_by: "newest"), class: "btn btn--link", data: { turbo_frame: "_top" } %>
<%= link_to "Which cards were added by #{me_or_you}?",
cards_path(creator_ids: [ @user.id ], sorted_by: "newest"), class: "btn btn--link", data: { turbo_frame: "_top" } %>
<% end %>
<% if Current.user == @user %>
<%= button_to session_path(script_name: nil), method: :delete, class: "btn txt-x-small center", form: { data: { turbo: false, controller: "clear-offline-cache", action: "submit->clear-offline-cache#clearCache" } } do %>
Sign out of Fizzy on this device
<% end %>
<% end %>