add image uploads to on-site theme editor and fix scroll on navigation
All checks were successful
deploy / deploy (push) Successful in 1m27s
All checks were successful
deploy / deploy (push) Successful in 1m27s
Phase 4 of unified editing: image upload handling in hook context. - Configure uploads in Shop.Page mount for logo, header, icon - Add upload UI components to theme_editor compact_editor - Pass uploads through page_renderer to theme editor - Add cancel_upload handler to PageEditorHook Also fixes scroll position not resetting on patch navigation: - Push scroll-top event when path changes in handle_params - JS listener scrolls window to top instantly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -951,6 +951,11 @@ window.addEventListener("phx:scroll-preview-top", (e) => {
|
||||
}
|
||||
})
|
||||
|
||||
// Scroll to top on page navigation (patch navigation within LiveView)
|
||||
window.addEventListener("phx:scroll-top", () => {
|
||||
window.scrollTo({top: 0, behavior: 'instant'})
|
||||
})
|
||||
|
||||
// connect if there are any LiveViews on the page
|
||||
liveSocket.connect()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user