Sha256: 83563ff4d5a96b97594a9db19fc9dea03eb38811d383b5a57a41023e7a4cfb19

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

<div data-controller="toggle-panel">
  <a href="javascript:void(0);" class="flex items-center cursor-pointer font-semibold text-gray-700" data-action="click->toggle-panel#togglePanel">
    <% if _current_user.respond_to? 'avatar' %>
      <%= image_tag _current_user.avatar, class: "h-12 rounded-full border-4 border-white mr-1" if _current_user.avatar.present? %>
    <% end %>
    <% if _current_user.name.present? %>
      <%= _current_user.name %>
    <% elsif _current_user.email.present? %>
      <%= _current_user.email %>
    <% else %>
      Avo user
    <% end %>
    <%= svg 'chevron-down', class: "ml-1 h-4" %>
  </a>

  <div class="hidden absolute inset-auto inset-auto right-0 mr-6 mt-0 py-4 bg-white rounded-xl min-w-[200px] shadow-context" data-toggle-panel-target="panel">
    <%= button_to "Sign out", main_app.destroy_user_session_path, method: :delete, form: { "data-turbo" => "false" }, class: "appearance-none bg-white text-left cursor-pointer text-green-600 font-semibold hover:text-white hover:bg-green-500 block px-4 py-1 w-full" %>
  </div>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
avo-1.4.5.pre.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.4.4.pre.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.4.3 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.4.2 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.4.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.4.0 app/views/avo/partials/_profile_dropdown.html.erb