diff --git a/apps/nextjs/src/app/[locale]/manage/apps/page.tsx b/apps/nextjs/src/app/[locale]/manage/apps/page.tsx index 7ddf2816a..11aa2e8eb 100644 --- a/apps/nextjs/src/app/[locale]/manage/apps/page.tsx +++ b/apps/nextjs/src/app/[locale]/manage/apps/page.tsx @@ -105,7 +105,7 @@ const AppNoResults = async () => { {t("app.page.list.noResults.title")} - {t("app.page.list.noResults.description")} + {t("app.page.list.noResults.action")} ); diff --git a/apps/nextjs/src/app/[locale]/manage/layout.tsx b/apps/nextjs/src/app/[locale]/manage/layout.tsx index 58314d65a..b4d1564c4 100644 --- a/apps/nextjs/src/app/[locale]/manage/layout.tsx +++ b/apps/nextjs/src/app/[locale]/manage/layout.tsx @@ -15,6 +15,7 @@ import { IconPlug, IconQuestionMark, IconReport, + IconSearch, IconSettings, IconTool, IconUser, @@ -53,6 +54,11 @@ export default async function ManageLayout({ children }: PropsWithChildren) { href: "/manage/integrations", label: t("items.integrations"), }, + { + icon: IconSearch, + href: "/manage/search-engines", + label: t("items.searchEngies"), + }, { icon: IconUser, label: t("items.users.label"), diff --git a/apps/nextjs/src/app/[locale]/manage/search-engines/_form.tsx b/apps/nextjs/src/app/[locale]/manage/search-engines/_form.tsx new file mode 100644 index 000000000..e937cf503 --- /dev/null +++ b/apps/nextjs/src/app/[locale]/manage/search-engines/_form.tsx @@ -0,0 +1,73 @@ +"use client"; + +import Link from "next/link"; +import { Button, Grid, Group, Stack, Textarea, TextInput } from "@mantine/core"; + +import { useZodForm } from "@homarr/form"; +import type { TranslationFunction } from "@homarr/translation"; +import { useI18n } from "@homarr/translation/client"; +import type { z } from "@homarr/validation"; +import { validation } from "@homarr/validation"; + +import { IconPicker } from "~/components/icons/picker/icon-picker"; + +type FormType = z.infer; + +interface SearchEngineFormProps { + submitButtonTranslation: (t: TranslationFunction) => string; + initialValues?: FormType; + handleSubmit: (values: FormType) => void; + isPending: boolean; + disableShort?: boolean; +} + +export const SearchEngineForm = (props: SearchEngineFormProps) => { + const { submitButtonTranslation, handleSubmit, initialValues, isPending, disableShort } = props; + const t = useI18n(); + + const form = useZodForm(validation.searchEngine.manage, { + initialValues: initialValues ?? { + name: "", + short: "", + iconUrl: "", + urlTemplate: "", + description: "", + }, + }); + + return ( +
+ + + + + + + + + + + +