Sha256: 00a2381507aeaab67551b4fa3468667d6dea5e89fcd51d6d2964a6c23019f164

Contents?: true

Size: 1.34 KB

Versions: 28

Compression:

Stored size: 1.34 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 "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

28 entries across 28 versions & 1 rubygems

Version Path
avo-1.16.2 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.16.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.16.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.15.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.15.0.pre.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.14.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.13.3 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.13.2 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.13.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.13.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.12.4 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.12.3 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.12.2 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.12.1 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.12.0 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.11.6 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.11.5 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.11.4 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.11.3 app/views/avo/partials/_profile_dropdown.html.erb
avo-1.11.2 app/views/avo/partials/_profile_dropdown.html.erb