Sha256: 917763f1f74f877c3524e2eca00c278d90a94843bc80be72d66d45eb6150057a

Contents?: true

Size: 1.35 KB

Versions: 10

Compression:

Stored size: 1.35 KB

Contents

<div <% if main_app.respond_to?(:destroy_user_session_path) %> data-controller="toggle-panel" <% end %>>
  <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) &&  _current_user.avatar.present? %>
      <%= image_tag _current_user.avatar, class: "h-12 rounded-full border-4 border-white mr-1" %>
    <% end %>
    <% if _current_user.respond_to?(:name) && _current_user.name.present? %>
      <%= _current_user.name %>
    <% elsif _current_user.respond_to?(:email) && _current_user.email.present? %>
      <%= _current_user.email %>
    <% else %>
      Avo user
    <% end %>
    <% if main_app.respond_to?(:destroy_user_session_path) %>
      <%= svg 'chevron-down', class: "ml-1 h-4" %>
    <% end %>
  </a>

  <% if main_app.respond_to?(:destroy_user_session_path) %>
    <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 t('avo.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>
  <% end %>
</div>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
avo-1.18.2.pre.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.18.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.18.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.18.0.pre.3 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.18.0.pre.2 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.18.0.pre.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.17.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.17.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.16.4 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.16.3 app/views/avo/partials/_profile_dropdown.html.erb