@samitouri / QOSami-HFS / commits / 4c8923e4

admin/internet: adapt domain field size in case of long content

Massimo Melina committed Mar 23, 2024 at 12:12 UTC 4c8923e40669086df3571ef476e7026c5b5e78d7
1 file changed +14 -3
admin/src/InternetPage.ts
+14 -3
@@ -185,9 +185,20 @@ export default function InternetPage() {
185 },
186 fields: [
187 md("Generate certificate using [Let's Encrypt](https://letsencrypt.org)"),
188 - { k: 'acme_domain', label: "Domain for certificate", sm: 6, required: true, helperText: md("Example: your.domain.com\nMultiple domains separated by commas") },
189 - { k: 'acme_email', label: "E-mail for certificate", sm: 6 },
190 - { k: 'acme_renew', label: "Automatic renew one month before expiration", comp: BoolField, disabled: !values.acme_domain },
188 + {
189 + k: 'acme_domain',
190 + label: "Domain for certificate",
191 + sm: values.acme_domain?.length > 30 ? 12 : 6,
192 + required: true,
193 + helperText: md("Example: your.domain.com\nMultiple domains separated by commas")
194 + },
195 + { k: 'acme_email', label: "E-mail for certificate", sm: true },
196 + {
197 + k: 'acme_renew',
198 + label: "Automatic renew one month before expiration",
199 + comp: BoolField,
200 + disabled: !values.acme_domain
201 + },
202 ],
203 save: {
204 children: "Request",