mirror of
https://github.com/harness/drone.git
synced 2025-05-17 01:20:13 +08:00
feat: [AH-885]: fix breaking UI because of secret input in create webhook form (#3456)
* feat: [AH-885]: fix breaking UI because of secret input in create webhook form
This commit is contained in:
parent
6f7382d9e6
commit
be4291baef
@ -17,3 +17,9 @@
|
||||
.triggerType {
|
||||
margin-bottom: var(--spacing-xsmall) !important;
|
||||
}
|
||||
|
||||
.secretFormInput {
|
||||
&.createForm > div {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
|
@ -16,4 +16,6 @@
|
||||
|
||||
/* eslint-disable */
|
||||
// This is an auto-generated file
|
||||
export declare const createForm: string
|
||||
export declare const secretFormInput: string
|
||||
export declare const triggerType: string
|
||||
|
@ -15,8 +15,9 @@
|
||||
*/
|
||||
|
||||
import React from 'react'
|
||||
import classNames from 'classnames'
|
||||
import type { FormikProps } from 'formik'
|
||||
import { Checkbox, FormikForm, FormInput, Layout } from '@harnessio/uicore'
|
||||
import { Checkbox, Container, FormikForm, FormInput, Layout } from '@harnessio/uicore'
|
||||
|
||||
import { useStrings } from '@ar/frameworks/strings'
|
||||
import { useAppStore, useParentComponents } from '@ar/hooks'
|
||||
@ -26,6 +27,8 @@ import SelectTriggers from './SelectTriggers'
|
||||
import type { WebhookRequestUI } from './types'
|
||||
import ExtraHeadersFormContent from './ExtraHeadersFormContent/ExtraHeadersFormContent'
|
||||
|
||||
import css from './Forms.module.scss'
|
||||
|
||||
interface WebhookFormContentProps {
|
||||
formikProps: FormikProps<WebhookRequestUI>
|
||||
readonly?: boolean
|
||||
@ -64,15 +67,20 @@ export default function WebhookFormContent(props: WebhookFormContentProps) {
|
||||
placeholder={getString('enterPlaceholder', { name: getString('webhookList.formFields.url') })}
|
||||
disabled={readonly}
|
||||
/>
|
||||
<SecretFormInput
|
||||
name="secretIdentifier"
|
||||
spaceIdFieldName="secretSpaceId"
|
||||
label={getString('webhookList.formFields.secret')}
|
||||
placeholder={getString('enterPlaceholder', { name: getString('webhookList.formFields.secret') })}
|
||||
scope={scope}
|
||||
disabled={readonly}
|
||||
formik={formikProps}
|
||||
/>
|
||||
<Container
|
||||
className={classNames(css.secretFormInput, {
|
||||
[css.createForm]: !isEdit
|
||||
})}>
|
||||
<SecretFormInput
|
||||
name="secretIdentifier"
|
||||
spaceIdFieldName="secretSpaceId"
|
||||
label={getString('webhookList.formFields.secret')}
|
||||
placeholder={getString('enterPlaceholder', { name: getString('webhookList.formFields.secret') })}
|
||||
scope={scope}
|
||||
disabled={readonly}
|
||||
formik={formikProps}
|
||||
/>
|
||||
</Container>
|
||||
</Layout.Vertical>
|
||||
<Layout.Vertical spacing="large">
|
||||
<SelectTriggers formikProps={formikProps} disabled={readonly} />
|
||||
|
Loading…
Reference in New Issue
Block a user