From 4940c39e4b4a3e89399878059120a40de504f633 Mon Sep 17 00:00:00 2001 From: Rick van der Staaij Date: Tue, 21 Jul 2026 13:21:14 +0200 Subject: [PATCH 1/2] Add local host names check in the generator --- src/components/Form/Text/Text.tsx | 8 ++-- src/components/Generator/Generator.tsx | 3 ++ .../Highlighter/lineRenderers.tsx | 2 +- .../GeneredTaskfile/addons/addons.ts | 2 + .../addons/localHosts/LocalDomains.tsx | 39 +++++++++++++++++++ .../addons/localHosts/index.ts | 1 + .../localHosts/local-domains.module.scss | 5 +++ .../addons/localHosts/localHosts.ts | 27 +++++++++++++ .../addons/localHosts/set-local-hosts.sh | 17 ++++++++ .../Generator/Settings/Settings.tsx | 4 ++ .../Generator/Settings/settings.module.scss | 2 +- 11 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 src/components/Generator/GeneredTaskfile/addons/localHosts/LocalDomains.tsx create mode 100644 src/components/Generator/GeneredTaskfile/addons/localHosts/index.ts create mode 100644 src/components/Generator/GeneredTaskfile/addons/localHosts/local-domains.module.scss create mode 100644 src/components/Generator/GeneredTaskfile/addons/localHosts/localHosts.ts create mode 100644 src/components/Generator/GeneredTaskfile/addons/localHosts/set-local-hosts.sh diff --git a/src/components/Form/Text/Text.tsx b/src/components/Form/Text/Text.tsx index ba277d8..30941e1 100644 --- a/src/components/Form/Text/Text.tsx +++ b/src/components/Form/Text/Text.tsx @@ -1,4 +1,4 @@ -import { HTMLAttributes, HTMLInputAutoCompleteAttribute, HTMLInputTypeAttribute, ReactElement } from 'react'; +import { HTMLInputAutoCompleteAttribute, HTMLInputTypeAttribute, InputHTMLAttributes, ReactElement } from 'react'; import { RegisterOptions, useFormContext } from 'react-hook-form'; import FormError from '@/components/Form/Error'; @@ -6,12 +6,12 @@ import FormError from '@/components/Form/Error'; import styles from '../form.module.css'; type TextInputProps = { - title: string; + title?: string; name: string; options?: RegisterOptions; type?: HTMLInputTypeAttribute; autoComplete?: HTMLInputAutoCompleteAttribute; -} & HTMLAttributes; +} & InputHTMLAttributes; const TextInput = ({ name, @@ -25,7 +25,7 @@ const TextInput = ({ return (