diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-icons.ts b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-icons.ts index 008d8b34f..0faccc11c 100644 --- a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-icons.ts +++ b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-icons.ts @@ -1,9 +1,11 @@ import { + IconCode, IconGrid3x3, IconKey, IconMessage, IconPassword, IconPasswordUser, + IconPlug, IconServer, IconUser, } from "@tabler/icons-react"; @@ -21,4 +23,7 @@ export const integrationSecretIcons = { topic: IconMessage, opnsenseApiKey: IconKey, opnsenseApiSecret: IconPassword, + githubAppId: IconCode, + githubInstallationId: IconPlug, + privateKey: IconKey, } satisfies Record; diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-inputs.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-inputs.tsx index 45f5b3156..78e2d78c1 100644 --- a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-inputs.tsx +++ b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-inputs.tsx @@ -1,7 +1,7 @@ "use client"; import type { ChangeEventHandler, FocusEventHandler } from "react"; -import { PasswordInput, TextInput } from "@mantine/core"; +import { PasswordInput, Textarea, TextInput } from "@mantine/core"; import { integrationSecretKindObject } from "@homarr/definitions"; import type { IntegrationSecretKind } from "@homarr/definitions"; @@ -14,9 +14,9 @@ interface IntegrationSecretInputProps { label?: string; kind: IntegrationSecretKind; value?: string; - onChange: ChangeEventHandler; - onFocus?: FocusEventHandler; - onBlur?: FocusEventHandler; + onChange: ChangeEventHandler; + onFocus?: FocusEventHandler; + onBlur?: FocusEventHandler; error?: string; } @@ -31,6 +31,19 @@ export const IntegrationSecretInput = (props: IntegrationSecretInputProps) => { const PublicSecretInput = ({ kind, ...props }: IntegrationSecretInputProps) => { const t = useI18n(); const Icon = integrationSecretIcons[kind]; + const { multiline } = integrationSecretKindObject[kind]; + if (multiline) { + return ( +