improve setup UX: password field, setup hook, checklist banners, theme tweaks
All checks were successful
deploy / deploy (push) Successful in 1m31s
All checks were successful
deploy / deploy (push) Successful in 1m31s
- add password field and required shop name to setup wizard - extract SetupHook for DRY redirect to /setup when no admin exists - add ?from=checklist param to checklist hrefs with contextual banner on email settings and theme pages for easy return to dashboard - remove email warning banner from admin layout (checklist covers it) - make email a required checklist item (no longer optional) - add DevReset module for wiping dev data without restart - rename "Theme Studio" to "Theme", drop subtitle - lower theme editor side-by-side breakpoint from 64em to 48em - clean up login/registration pages (remove dead registration_open code) - fix settings.put_secret to invalidate cache after write Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -192,7 +192,10 @@ defmodule BerrypodWeb.Router do
|
||||
pipe_through [:browser]
|
||||
|
||||
live_session :current_user,
|
||||
on_mount: [{BerrypodWeb.UserAuth, :mount_current_scope}] do
|
||||
on_mount: [
|
||||
{BerrypodWeb.SetupHook, :require_admin},
|
||||
{BerrypodWeb.UserAuth, :mount_current_scope}
|
||||
] do
|
||||
live "/users/register", Auth.Registration, :new
|
||||
live "/users/log-in", Auth.Login, :new
|
||||
live "/users/log-in/:token", Auth.Confirmation, :new
|
||||
@@ -239,6 +242,7 @@ defmodule BerrypodWeb.Router do
|
||||
live_session :coming_soon,
|
||||
layout: {BerrypodWeb.Layouts, :shop},
|
||||
on_mount: [
|
||||
{BerrypodWeb.SetupHook, :require_admin},
|
||||
{BerrypodWeb.ThemeHook, :mount_theme}
|
||||
] do
|
||||
live "/coming-soon", Shop.ComingSoon, :index
|
||||
@@ -247,6 +251,7 @@ defmodule BerrypodWeb.Router do
|
||||
live_session :public_shop,
|
||||
layout: {BerrypodWeb.Layouts, :shop},
|
||||
on_mount: [
|
||||
{BerrypodWeb.SetupHook, :require_admin},
|
||||
{BerrypodWeb.UserAuth, :mount_current_scope},
|
||||
{BerrypodWeb.ThemeHook, :mount_theme},
|
||||
{BerrypodWeb.ThemeHook, :require_site_live},
|
||||
|
||||
Reference in New Issue
Block a user