extract setup wizard to dedicated /admin/setup page
Move the setup stepper out of the dashboard into its own LiveView. Dashboard now redirects to setup when site isn't live, and shows stats-only view once live. Also cleans up button component variant handling, fixes alert CSS, and removes stale demo.html. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,7 @@ defmodule BerrypodWeb.Auth.ConfirmationTest do
|
||||
assert Accounts.get_user!(user.id).confirmed_at
|
||||
# we are logged in now
|
||||
assert get_session(conn, :user_token)
|
||||
assert redirected_to(conn) == ~p"/admin"
|
||||
assert redirected_to(conn) == ~p"/admin/setup"
|
||||
|
||||
# log out, new conn
|
||||
conn = build_conn()
|
||||
|
||||
@@ -56,7 +56,7 @@ defmodule BerrypodWeb.Auth.LoginTest do
|
||||
|
||||
conn = submit_form(form, conn)
|
||||
|
||||
assert redirected_to(conn) == ~p"/admin"
|
||||
assert redirected_to(conn) == ~p"/admin/setup"
|
||||
end
|
||||
|
||||
test "redirects to login page with a flash error if credentials are invalid", %{
|
||||
|
||||
@@ -25,7 +25,7 @@ defmodule BerrypodWeb.Auth.RegistrationTest do
|
||||
conn
|
||||
|> log_in_user(user_fixture())
|
||||
|> live(~p"/users/register")
|
||||
|> follow_redirect(conn, ~p"/admin")
|
||||
|> follow_redirect(conn, ~p"/admin/setup")
|
||||
|
||||
assert {:ok, _conn} = result
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user