feat: allow adding links via ip

This commit is contained in:
Sonny
2025-11-09 03:10:51 +01:00
parent 208f2c631f
commit 1c81a6a86f
9 changed files with 63 additions and 25 deletions

View File

@@ -2,7 +2,7 @@ import { useForm } from '@inertiajs/react';
import { route } from '@izzyjs/route/client';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import MantineFormLink from '~/components/form/form_link';
import { FormLink } from '~/components/form/form_link';
import useSearchParam from '~/hooks/use_search_param';
import { isValidHttpUrl } from '~/lib/navigation';
import { Collection } from '~/types/app';
@@ -38,7 +38,7 @@ export default function CreateLinkPage({
};
return (
<MantineFormLink
<FormLink
title={t('link.create')}
textSubmitButton={t('form.create')}
canSubmit={canSubmit}

View File

@@ -1,7 +1,7 @@
import { useForm } from '@inertiajs/react';
import { route } from '@izzyjs/route/client';
import { useTranslation } from 'react-i18next';
import MantineFormLink from '~/components/form/form_link';
import { FormLink } from '~/components/form/form_link';
import { LinkWithCollection } from '~/types/app';
export default function DeleteLinkPage({ link }: { link: LinkWithCollection }) {
@@ -22,7 +22,7 @@ export default function DeleteLinkPage({ link }: { link: LinkWithCollection }) {
};
return (
<MantineFormLink
<FormLink
title={t('link.delete')}
textSubmitButton={t('form.delete')}
canSubmit={!processing}

View File

@@ -2,7 +2,7 @@ import { useForm } from '@inertiajs/react';
import { route } from '@izzyjs/route/client';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import MantineFormLink from '~/components/form/form_link';
import { FormLink } from '~/components/form/form_link';
import { isValidHttpUrl } from '~/lib/navigation';
import { Collection, Link } from '~/types/app';
@@ -50,7 +50,7 @@ export default function EditLinkPage({
};
return (
<MantineFormLink
<FormLink
title={t('link.edit')}
textSubmitButton={t('form.update')}
canSubmit={canSubmit}