Sha256: f6c589394c5256f28146ce2cf2785ff3441c747e455e3fa31dce9c2cd12d1365

Contents?: true

Size: 1.56 KB

Versions: 2

Compression:

Stored size: 1.56 KB

Contents

<nav class="
  flex flex-col
  bg-gray-15
  p-4
  w-full
" data-controller="<%= stimulus_id %>" data-<%= stimulus_id %>-cookie-value="solidus_admin">
  <%= link_to @store.url, class: "py-3 px-2 text-left flex mb-4" do %>
    <%= image_tag @logo_path, alt: t('.visit_store'), class: "max-h-7" %>
  <% end %>

  <%= link_to @store.url, target: :_blank, class: "flex mb-4 px-2 py-1.5 border border-gray-100 rounded-sm shadow-sm" do %>
    <div class="flex-grow">
      <p class="body-small-bold text-black"><%= @store.name %></p>
      <p class="body-tiny text-gray-500"><%= @store.url %></p>
    </div>
    <%= render component("ui/icon").new(name: 'arrow-right-up-line', class: 'w-4 h-4 fill-gray-400') %>
  <% end %>

  <ul>
    <%= render component("sidebar/item").with_collection(items, fullpath: request.fullpath) %>
  </ul>

  <div class="mt-auto">
    <div class="group mb-3">
      <label class="flex gap-3 items-center py-0.5 px-3 pb-0.5 rounded hover:text-red-500 hover:bg-gray-50 body-small-bold text-black cursor-pointer">
        <%= t('spree.navigation.switch_to_legacy') %>
        <div class="flex items-center">
          <%= render component("ui/forms/switch").new(size: :s, checked: false, 'data-action': "#{stimulus_id}#setCookie:prevent") %>
        </div>
      </label>
    </div>
    <%= render component("sidebar/account_nav").new(
      user_label: helpers.current_solidus_admin_user.email,
      account_path: solidus_admin.account_path,
      logout_path: helpers.solidus_admin_logout_path,
      logout_method: helpers.solidus_admin_logout_method,
    ) %>
  </div>
</nav>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_admin-0.0.2 app/components/solidus_admin/sidebar/component.html.erb
solidus_admin-0.0.1 app/components/solidus_admin/sidebar/component.html.erb