All checks were successful
deploy / deploy (push) Successful in 1m27s
Replace individual shop LiveViews with a single Shop.Page that dispatches to page modules based on live_action. This enables patch navigation between pages, preserving socket state (including editor state) across transitions. Changes: - Add Shop.Page unified LiveView with handle_params dispatch - Extract page logic into Shop.Pages.* modules (Home, Product, Collection, etc.) - Update router to use Shop.Page with live_action for all shop routes - Change navigate= to patch= in shop component links - Add maybe_sync_editing_blocks to reload editor state when page changes - Track editor_page_slug to detect cross-page navigation while editing - Fix picture element height when hover image disabled - Extract ThemeEditor components for shared use Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
857 B
Elixir
34 lines
857 B
Elixir
defmodule BerrypodWeb.Shop.ComingSoon do
|
|
use BerrypodWeb, :live_view
|
|
|
|
@impl true
|
|
def mount(_params, _session, socket) do
|
|
{:ok, assign(socket, :page_title, "Coming soon")}
|
|
end
|
|
|
|
@impl true
|
|
def handle_params(_params, _uri, socket) do
|
|
{:noreply, socket}
|
|
end
|
|
|
|
@impl true
|
|
def render(assigns) do
|
|
~H"""
|
|
<main class="coming-soon" role="main">
|
|
<div>
|
|
<div :if={@logo_image} class="coming-soon-logo">
|
|
<img src={logo_url(@logo_image)} alt={@site_name} />
|
|
</div>
|
|
<h1 class="coming-soon-title">{@site_name}</h1>
|
|
<p class="coming-soon-message">
|
|
We're getting things ready. Check back soon.
|
|
</p>
|
|
</div>
|
|
<a href="/admin" class="coming-soon-admin-link">Admin</a>
|
|
</main>
|
|
"""
|
|
end
|
|
|
|
defp logo_url(logo_image), do: "/image_cache/#{logo_image.id}.webp"
|
|
end
|