integrate R module and add url editor ui
Replaces hardcoded paths with R module throughout: - Shop components: layout nav, cart, product links - Controllers: cart, checkout, contact, seo, order lookup - Shop pages: collection, product, search, checkout success, etc. - Site context: nav item url resolution Admin URL management: - Settings page: prefix editor with validation feedback - Page renderer: url_editor component for page URLs - CSS for url editor styling Test updates for cache isolation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,8 @@ defmodule BerrypodWeb do
|
||||
use Gettext, backend: BerrypodWeb.Gettext
|
||||
|
||||
import Plug.Conn
|
||||
# Runtime URL paths (custom slugs/prefixes)
|
||||
alias BerrypodWeb.R
|
||||
|
||||
unquote(verified_routes())
|
||||
end
|
||||
@@ -53,6 +55,11 @@ defmodule BerrypodWeb do
|
||||
quote do
|
||||
use Phoenix.LiveView
|
||||
|
||||
# Enable sandbox access for LiveView processes in test mode
|
||||
if Application.compile_env(:berrypod, :env) == :test do
|
||||
on_mount BerrypodWeb.LiveSandboxHook
|
||||
end
|
||||
|
||||
unquote(html_helpers())
|
||||
end
|
||||
end
|
||||
@@ -93,6 +100,8 @@ defmodule BerrypodWeb do
|
||||
# Common modules used in templates
|
||||
alias Phoenix.LiveView.JS
|
||||
alias BerrypodWeb.Layouts
|
||||
# Runtime URL paths (custom slugs/prefixes)
|
||||
alias BerrypodWeb.R
|
||||
|
||||
# Routes generation with the ~p sigil
|
||||
unquote(verified_routes())
|
||||
|
||||
Reference in New Issue
Block a user