Skip to content

Commit

Permalink
Merge pull request #5295 from solidusio/elia/admin/sidebar-tweaks
Browse files Browse the repository at this point in the history
[Admin] Sidebar tweaks
  • Loading branch information
rainerdema authored Aug 1, 2023
2 parents 93549ae + 85c2654 commit a90918b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 2 additions & 4 deletions admin/app/components/solidus_admin/sidebar/component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
<%= image_tag @logo_path, alt: t('.visit_store'), class: "max-h-7" %>
<% end %>
<%= link_to @store.url, class: "flex mt-4 mb-2 px-2 py-1.5 border border-gray-100 rounded-sm shadow-sm" do %>
<%= link_to @store.url, target: :_blank, class: "flex mt-4 mb-2 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>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path d="M10.6693 6.27614L4.93158 12.0139L3.98877 11.0711L9.7265 5.33333H4.66932V4H12.0026V11.3333H10.6693V6.27614Z" fill="#A3A3A3"/>
</svg>
<%= render @icon_component.new(name: 'arrow-right-up-line', class: 'w-4 h-4 fill-gray-400') %>
<% end %>
<div data-controller="main-nav" class="mt-2">
<ul>
Expand Down
5 changes: 4 additions & 1 deletion admin/app/components/solidus_admin/sidebar/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ def initialize(
store:,
logo_path: SolidusAdmin::Config.logo_path,
items: container["main_nav_items"],
icon_component: component("ui/icon"),
item_component: component("sidebar/item"),
account_nav_component: component("sidebar/account_nav")
)
@logo_path = logo_path
@items = items
@store = store

@icon_component = icon_component
@item_component = item_component
@account_nav_component = account_nav_component
@store = store
end

def items
Expand Down

0 comments on commit a90918b

Please sign in to comment.