diff --git a/src/components/configure-application-github/index.tsx b/src/components/configure-application-github/index.tsx index f3ee5e88c..2d2ec0a8c 100644 --- a/src/components/configure-application-github/index.tsx +++ b/src/components/configure-application-github/index.tsx @@ -28,6 +28,7 @@ import { import { pollingInterval } from '../../store/defaults'; import { handlePromiseWithToast } from '../global-top-nav/styled-toaster'; import { getFetchErrorMessage } from '../../store/utils'; +import { ScrimPopup } from '../scrim-popup'; const radixZoneDNS = configVariables.RADIX_CLUSTER_BASE; @@ -53,7 +54,8 @@ export const ConfigureApplicationGithub = ({ const isExpanded = !!startVisible; const webhookURL = `https://webhook.${radixZoneDNS}/events/github?appName=${app.name}`; const [useOtherCiTool, setUseOtherCiTool] = useState(false); - + const [visibleRegenerateScrim, setVisibleRegenerateScrim] = + useState(false); const [regenerateSecrets, { isLoading, error }] = useRegenerateDeployKeyMutation(); const { data: secrets, refetch: refetchSecrets } = @@ -63,13 +65,14 @@ export const ConfigureApplicationGithub = ({ ); const onRegenerate = handlePromiseWithToast(async () => { + setVisibleRegenerateScrim(false); await regenerateSecrets({ appName: app.name, regenerateDeployKeyAndSecretData: { sharedSecret: nanoid() }, }).unwrap(); await refetchSecrets(); await refetch?.(); - }); + }, 'Successfully re-generated deploy key and webhook secret'); return (
@@ -130,9 +133,40 @@ export const ConfigureApplicationGithub = ({ Regenerating… ) : ( - + <> + setVisibleRegenerateScrim(false)} + isDismissable + > +
+
+ + Do you want to re-generate{' '} + deploy key and webhook secret? + + + New deploy key and webhook secret need to be put + to the GitHub repository settings + +
+ + + + + +
+
+ + )}
diff --git a/src/components/configure-application-github/style.css b/src/components/configure-application-github/style.css index 6b78d972b..1fed62dfd 100644 --- a/src/components/configure-application-github/style.css +++ b/src/components/configure-application-github/style.css @@ -34,3 +34,19 @@ filter: invert(0); } } + +.regenerate-content { + padding: var(--eds_spacing_medium); + padding-top: 0; + overflow: auto; +} +@media (min-width: 150rem) { + .regenerate-content { + margin: auto; + } +} + +.regenerate-options { + margin-top: auto; + margin-bottom: auto; +}