Skip to content

Commit

Permalink
fix: fix inadvertent caching of main inspector window
Browse files Browse the repository at this point in the history
  • Loading branch information
allmarkedup committed Dec 6, 2022
1 parent bf016f6 commit 88be143
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions app/views/layouts/lookbook/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<% content_for :shell do %>
<% if @previews.any? || @pages.any? %>
<% cache do %>
<%= lookbook_render :split_layout,
alpine_data: "$store.layout.main",
":class": "$store.layout.mobile && '!block'" do |layout| %>

<% layout.pane id: "app-sidebar", class: "flex flex-col bg-lookbook-sidebar-bg relative translate-x-0",
":class": "{
'transition': $store.layout.mobile,
'translate-x-full': $store.layout.mobile && sidebarHidden,
'!absolute right-0 bottom-0 top-[40px] h-[calc(100%_-_40px)] w-full max-w-[420px] z-50 border-l border-lookbook-divider': $store.layout.mobile
}",
"@click.outside": "closeMobileSidebar",
cloak: true do %>

<%= lookbook_render :split_layout,
alpine_data: "$store.layout.main",
":class": "$store.layout.mobile && '!block'" do |layout| %>

<% layout.pane id: "app-sidebar", class: "flex flex-col bg-lookbook-sidebar-bg relative translate-x-0",
":class": "{
'transition': $store.layout.mobile,
'translate-x-full': $store.layout.mobile && sidebarHidden,
'!absolute right-0 bottom-0 top-[40px] h-[calc(100%_-_40px)] w-full max-w-[420px] z-50 border-l border-lookbook-divider': $store.layout.mobile
}",
"@click.outside": "closeMobileSidebar",
cloak: true do %>
<% cache do %>
<%= lookbook_render :split_layout,
alpine_data: "$store.layout.#{@pages.any? && @previews.any? ? "sidebar" : "singleSectionSidebar"}",
style: "height: calc(100vh - 2.5rem);" do |layout| %>
Expand Down Expand Up @@ -64,12 +64,13 @@
<% end %>
<% end %>
<% end %>
<% end %>

<% layout.pane id: "app-main", class: "overflow-hidden h-full", ":class": "$store.layout.mobile && 'w-screen'" do %>
<%= content_for?(:main) ? yield(:main) : yield %>
<% end %>
<% layout.pane id: "app-main", class: "overflow-hidden h-full", ":class": "$store.layout.mobile && 'w-screen'" do %>
<%= content_for?(:main) ? yield(:main) : yield %>
<% end %>
<% end %>

<% else %>
<div id="app-main" class="w-screen h-full overflow-hidden">
<%= content_for?(:main) ? yield(:main) : yield %>
Expand Down

0 comments on commit 88be143

Please sign in to comment.