SkyeYoung commented on code in PR #3014:
URL: https://github.com/apache/apisix-dashboard/pull/3014#discussion_r2075813334
##########
src/components/form-slice/FormPartSSL/FormItemCertKeyList.tsx:
##########
@@ -0,0 +1,107 @@
+import { Button, Fieldset, Stack, type FieldsetProps } from '@mantine/core';
+import { useTranslation } from 'react-i18next';
+import { useFieldArray, useFormContext } from 'react-hook-form';
+import { FormSection } from '../FormSection';
+import type { SSLPostType } from './schema';
+import type { PropsWithChildren } from 'react';
+import { FormItemTextareaWithUpload } from
'@/components/form/TextareaWithUpload';
+import IconDelete from '~icons/material-symbols/delete-forever-outline';
+
+const PairWrapper = (
+ props: PropsWithChildren & Pick<FieldsetProps, 'legend'>
+) => {
+ const { children, legend } = props;
+ return (
+ <Fieldset p={8} mb={5} legend={legend}>
+ <Stack flex={1} gap={1}>
+ {children}
+ </Stack>
+ </Fieldset>
+ );
+};
+
+const RequiredCertKey = () => {
+ const { t } = useTranslation();
+ const { control } = useFormContext<SSLPostType>();
+ return (
+ <PairWrapper>
+ <FormItemTextareaWithUpload
+ control={control}
+ label={`${t('form.ssls.cert')} 1`}
Review Comment:
yes, it's a feature. This makes the required items cert and key as the first
items before certs and keys.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]