<%= lucide_icon("user") %>
<%= @actor.nickname %> <% if @actor.last_login_at %> <%= t(".last_login") %> <%= time_ago_in_words(@actor.last_login_at) %> <%= t('.ago') %>… <% else %> <%= t(".created") %> <%= time_ago_in_words(@actor.created_at) %> <%= t('.ago') %>… <% end %>
<%= lucide_icon("mail") %> <%= t( ".emails", count: @actor.email_addresses.length, email: @actor.email_addresses[0], ) %> <%= t(@actor.emails.empty? ? ".add_email" : ".add_more_email") %>
<%= t(".credentials") %>
<%= lucide_icon("check-circle-2", class: "stroke-success") %> <%= t(".password") %> <%= t(".change") %>
<% if @actor.totp_secret %> <%= lucide_icon("check-circle-2", class: "stroke-success") %> <% else %> <%= lucide_icon("minus-circle") %> <% end %> <%= t(".one_time_codes") %> <%= @actor.totp_secret ? t(".manage") : t(".enable") %>
<% if @actor.factor2? %>
<% if @actor.saved_backup_codes? %> <%= lucide_icon("check-circle-2", class: "stroke-success") %> <% else %> <%= lucide_icon("minus-circle") %> <% end %> <%= t(".backup_codes") %> <%= @actor.saved_backup_codes? ? t(".manage") : t(".enable") %>
<% end %>
<% if @actor.keys.any? %> <%= lucide_icon("check-circle-2", class: "stroke-success") %> <% else %> <%= lucide_icon("minus-circle") %> <% end %> <%= t(".keys") %> <%= @actor.keys.any? ? t(".add_more_key") : t(".add_key") %>
<%= t('.devices') %>
<% @actor.devices.each do |device| %>
<%= lucide_icon(device_icon(device)) %> <%= device.name %> @ <%= device.ip_address %> <%= t('.last_accessed') %> <%= time_ago_in_words(device.accessed_at) %> <%= t('.ago') %> <%= form_with url: device_path(key: device.key), method: :update do |form| %> <%= form.submit t(".logout"), name: 'reset', class: 'btn btn-xs hover:btn-error focus:btn-error' %> <% end %>
<% end %>