A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
Revert "fix(onboarding): return to welcome before administrator creation" (#7111)
Thomas3717c34da576
diff --git a/apps/docs/docs/getting-started/after-the-installation.mdx b/apps/docs/docs/getting-started/after-the-installation.mdxindex 2d46873df..0115e9282 100644--- a/apps/docs/docs/getting-started/after-the-installation.mdx+++ b/apps/docs/docs/getting-started/after-the-installation.mdx@@ -16,9 +16,7 @@ import {} from "@tabler/icons-react";After Homarr starts, open its URL. An unfinished installation redirects to the onboarding screen at `/init`. Choose-**Get started** for a new installation or **Restore backup** to import a compatible SQLite backup. Before creating the-administrator, you can return to Welcome with **Back**, including after refreshing `/init`. Creating the administrator-commits this setup stage; later steps do not rewind it.+**Get started** for a new installation or **Restore backup** to import a compatible SQLite backup.<Callout type="info" title="Persist /appdata before you continue">Onboarding writes the administrator and board configuration to the database. If onboarding returns after a restart,diff --git a/packages/api/src/router/onboard/onboard-router.ts b/packages/api/src/router/onboard/onboard-router.tsindex 339ee4d30..2b6b0b73d 100644--- a/packages/api/src/router/onboard/onboard-router.ts+++ b/packages/api/src/router/onboard/onboard-router.ts@@ -8,7 +8,7 @@ import { createId } from "@homarr/common";import { encryptSecret } from "@homarr/common/server";import { createLogger } from "@homarr/core/infrastructure/logs";import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";-import { handleTransactionsAsync, and, eq, inArray, like, notExists, or } from "@homarr/db";+import { handleTransactionsAsync, eq, inArray, like, or } from "@homarr/db";import { getServerSettingByKeyAsync } from "@homarr/db/queries";import {apps,@@ -25,7 +25,6 @@ import {sectionLayouts,sections,serverSettings,- users,} from "@homarr/db/schema";import {emptySuperJSON,@@ -148,23 +147,6 @@ export const onboardRouter = createTRPCRouter({await nextOnboardingStepAsync(ctx.db);}),- returnToWelcome: onboardingProcedure.requiresStep("user").mutation(async ({ ctx }) => {- const returnedRows = await ctx.db- .update(onboarding)- .set({ step: "start", previousStep: null })- .where(- and(- eq(onboarding.step, "user"),- eq(onboarding.previousStep, "start"),- notExists(ctx.db.select({ id: users.id }).from(users)),- ),- )- .returning({ id: onboarding.id });- if (returnedRows.length !== 1) {- throw new TRPCError({ code: "PRECONDITION_FAILED", message: "Administrator setup can no longer be restarted." });- }- }),-testIntegration: onboardingProcedure.requiresStep("setup").input(onboardingIntegrationDraftSchema)diff --git a/packages/onboarding/src/account.tsx b/packages/onboarding/src/account.tsxindex 9169c797b..0b084d168 100644--- a/packages/onboarding/src/account.tsx+++ b/packages/onboarding/src/account.tsx@@ -2,7 +2,7 @@import { useEffect, useRef, useState } from "react";import { Alert, Button, Stack, Text, TextInput } from "@mantine/core";-import { IconArrowLeft, IconArrowRight, IconShieldCheck, IconUserPlus } from "@tabler/icons-react";+import { IconArrowRight, IconShieldCheck, IconUserPlus } from "@tabler/icons-react";import type { z } from "zod/v4";import { clientApi } from "@homarr/api/client";@@ -36,12 +36,11 @@ const AccountShell = ({);export const AccountSetup = ({ environment }: OnboardingStudioProps) => {- if (environment.currentStep === "user") return <CredentialsSetup canReturnToWelcome={!environment.hasUsers} />;+ if (environment.currentStep === "user") return <CredentialsSetup />;return <ExternalGroupSetup />;};-const CredentialsSetup = ({ canReturnToWelcome }: { canReturnToWelcome: boolean }) => {- const navigationT = useI18n("init.studio");+const CredentialsSetup = () => {const t = useI18n("init.studio.account");const [requiresSignIn, setRequiresSignIn] = useState(false);const [submitError, setSubmitError] = useState<string | null>(null);@@ -55,16 +54,6 @@ const CredentialsSetup = ({ canReturnToWelcome }: { canReturnToWelcome: booleanshowErrorNotification({ title: t("errorTitle"), message });},});- const returnToWelcome = clientApi.onboard.returnToWelcome.useMutation({- async onSuccess() {- sounds.swoosh();- await revalidatePathActionAsync("/init");- },- onError() {- sounds.error();- showErrorNotification({ title: t("errorTitle"), message: t("unknownError") });- },- });const form = useZodForm(userInitSchema, {initialValues: { username: "", password: "", confirmPassword: "" },});@@ -130,27 +119,9 @@ const CredentialsSetup = ({ canReturnToWelcome }: { canReturnToWelcome: boolean{submitError}</Alert>) : null}- <Button- type="submit"- size="md"- loading={form.submitting}- disabled={returnToWelcome.isPending}- rightSection={<IconArrowRight size={18} />}- >+ <Button type="submit" size="md" loading={form.submitting} rightSection={<IconArrowRight size={18} />}>{t("create")}</Button>- {canReturnToWelcome && (- <Button- type="button"- variant="default"- leftSection={<IconArrowLeft size={18} />}- loading={returnToWelcome.isPending}- disabled={form.submitting}- onClick={() => returnToWelcome.mutate()}- >- {navigationT("back")}- </Button>- )}</Stack></form></AccountShell>