diff --git a/apps/nextjs/src/app/[locale]/init/_steps/integrations/docker-discovery-panel.tsx b/apps/nextjs/src/app/[locale]/init/_steps/integrations/docker-discovery-panel.tsx index 90ac7a68b..dac79c1d0 100644 --- a/apps/nextjs/src/app/[locale]/init/_steps/integrations/docker-discovery-panel.tsx +++ b/apps/nextjs/src/app/[locale]/init/_steps/integrations/docker-discovery-panel.tsx @@ -142,7 +142,7 @@ export const DockerDiscoveryIndicator = ({ - + {integrations.length > 0 && ( diff --git a/apps/nextjs/src/app/[locale]/init/_steps/integrations/init-integrations.tsx b/apps/nextjs/src/app/[locale]/init/_steps/integrations/init-integrations.tsx index 3f10fcb43..9657dfe81 100644 --- a/apps/nextjs/src/app/[locale]/init/_steps/integrations/init-integrations.tsx +++ b/apps/nextjs/src/app/[locale]/init/_steps/integrations/init-integrations.tsx @@ -4,8 +4,8 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { useRouter } from "next/navigation"; import { ActionIcon, + Alert, Button, - Card, Center, Collapse, Group, @@ -18,7 +18,7 @@ import { Tooltip, } from "@mantine/core"; import { useDisclosure } from "@mantine/hooks"; -import { IconArrowRight, IconSettings } from "@tabler/icons-react"; +import { IconArrowRight, IconInfoCircle, IconSettings } from "@tabler/icons-react"; import { clientApi } from "@homarr/api/client"; import type { IntegrationKind, UrlTemplateMode } from "@homarr/definitions"; @@ -29,6 +29,7 @@ import { IntegrationAvatar } from "@homarr/ui"; import { NewIntegrationForm } from "~/app/[locale]/manage/integrations/new/_integration-new-form"; import { IntegrationMultiSelectGrid } from "~/components/integration/integration-multi-select-grid"; +import { InitStepCard } from "../../_components/init-step-card"; import { DockerDiscoveryIndicator } from "./docker-discovery-panel"; type Phase = "select" | "configure" | "done"; @@ -41,8 +42,6 @@ interface IntegrationDraft { source: "manual" | "docker"; } -const CARD_WIDTH = 64 * 16; - export const InitIntegrations = () => { const [phase, setPhase] = useState("select"); const [drafts, setDrafts] = useState>(new Map()); @@ -171,14 +170,14 @@ export const InitIntegrations = () => { if (phase === "done") { return ( - +
{t("configure.finishing")}
-
+ ); } @@ -200,7 +199,7 @@ export const InitIntegrations = () => { } return ( - + {t("description")} @@ -212,32 +211,32 @@ export const InitIntegrations = () => { isLoading={isDockerLoading} /> - - - {t("urlTemplate.label")} - - - setBaseHost(e.currentTarget.value)} - /> - setUrlMode(value as UrlTemplateMode)} - data={[ - { label: t("urlTemplate.mode.subdomain"), value: "subdomain" }, - { label: t("urlTemplate.mode.hostPort"), value: "hostPort" }, - ]} - style={{ flex: "0 0 auto" }} - /> - - - {baseHost - ? t("urlTemplate.preview", { example: buildIntegrationUrl("sonarr", baseHost, urlMode) }) - : t("urlTemplate.hint")} - - + } title={t("urlTemplate.label")}> + + {t("urlTemplate.hint")} + + setBaseHost(e.currentTarget.value)} + /> + setUrlMode(value as UrlTemplateMode)} + data={[ + { label: t("urlTemplate.mode.subdomain"), value: "subdomain" }, + { label: t("urlTemplate.mode.hostPort"), value: "hostPort" }, + ]} + style={{ flex: "0 0 auto" }} + /> + + {baseHost && ( + + {t("urlTemplate.preview", { example: buildIntegrationUrl("sonarr", baseHost, urlMode) })} + + )} + + { - + ); }; @@ -300,7 +299,7 @@ const ConfigurePhase = ({ : draft?.initialUrl; return ( - + @@ -321,7 +320,7 @@ const ConfigurePhase = ({ - + - + ); }; diff --git a/apps/nextjs/src/components/integration/integration-multi-select-grid.tsx b/apps/nextjs/src/components/integration/integration-multi-select-grid.tsx index 97fe9e98d..0c5313ad7 100644 --- a/apps/nextjs/src/components/integration/integration-multi-select-grid.tsx +++ b/apps/nextjs/src/components/integration/integration-multi-select-grid.tsx @@ -51,6 +51,7 @@ export const IntegrationMultiSelectGrid = ({ search={search} onSearchChange={setSearch} placeholder={`${t("integration.page.list.search")}...`} + disableScroll={onboarding} > {filtered.map((integration) => { const isSelected = selectedKinds.has(integration.kind); diff --git a/packages/ui/src/select-grid-layout.tsx b/packages/ui/src/select-grid-layout.tsx index 0625873b3..fd7f076fc 100644 --- a/packages/ui/src/select-grid-layout.tsx +++ b/packages/ui/src/select-grid-layout.tsx @@ -13,6 +13,7 @@ interface SelectGridLayoutProps { onSearchChange: (value: string) => void; placeholder: string; onSearchKeyDown?: (event: KeyboardEvent) => void; + disableScroll?: boolean; children: ReactNode; } @@ -21,22 +22,27 @@ export const SelectGridLayout = ({ onSearchChange, placeholder, onSearchKeyDown, + disableScroll = false, children, -}: SelectGridLayoutProps) => ( - - onSearchChange(event.currentTarget.value)} - leftSection={} - placeholder={placeholder} - data-autofocus - onKeyDown={onSearchKeyDown} - /> +}: SelectGridLayoutProps) => { + const grid = ( + + {children} + + ); - - - {children} - - - -); + return ( + + onSearchChange(event.currentTarget.value)} + leftSection={} + placeholder={placeholder} + data-autofocus + onKeyDown={onSearchKeyDown} + /> + + {disableScroll ? grid : {grid}} + + ); +};