misc: finalized labels

This commit is contained in:
Sheen Capadngan
2024-09-04 23:54:19 +08:00
parent 27852607d1
commit 09e621539e
5 changed files with 6 additions and 11 deletions

View File

@@ -39,7 +39,6 @@ export const triggerSecretApprovalSlackNotif = async ({
environment,
secretPath
}: TTriggerSecretApprovalSlackNotif) => {
// construct message here
const appCfg = getConfig();
const project = await projectDAL.findProjectWithOrg(projectId);
const user = await userDAL.findById(secretApprovalRequest.committerUserId);

View File

@@ -1,5 +1,5 @@
export enum WorkflowIntegrationPlatform {
SLACK = "slack"
SLACK = "Slack"
}
export type SlackIntegration = {

View File

@@ -38,11 +38,7 @@ export const AddWorkflowIntegrationForm = ({ isOpen, onToggle }: Props) => {
return (
<Modal isOpen={isOpen} onOpenChange={(state) => handleFormReset(state)}>
<ModalContent
title="Add a workflow integration"
subTitle="Configure a workflow integration"
className="my-4"
>
<ModalContent title={`Add a ${selectedPlatform ?? "workflow"} integration`} className="my-4">
<AnimatePresence exitBeforeEnter>
{wizardStep === WizardSteps.SelectPlatform && (
<motion.div

View File

@@ -13,7 +13,7 @@ type Props = {
export const IntegrationFormDetails = ({ isOpen, id, onOpenChange, workflowPlatform }: Props) => {
return (
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
<ModalContent title="Workflow integration details">
<ModalContent title={`${WorkflowIntegrationPlatform.SLACK} integration`}>
{workflowPlatform === WorkflowIntegrationPlatform.SLACK && (
<SlackIntegrationForm id={id} onClose={() => onOpenChange(false)} />
)}

View File

@@ -89,7 +89,7 @@ export const SlackIntegrationForm = ({ id, onClose }: Props) => {
control={control}
name="slug"
render={({ field, fieldState: { error } }) => (
<FormControl label="Alias" errorText={error?.message} isError={Boolean(error)}>
<FormControl label="Alias" isRequired errorText={error?.message} isError={Boolean(error)}>
<Input placeholder="" {...field} />
</FormControl>
)}
@@ -104,13 +104,13 @@ export const SlackIntegrationForm = ({ id, onClose }: Props) => {
)}
/>
{slackIntegration && (
<FormControl label="Slack workspace">
<FormControl label="Connected Slack workspace">
<Input value={slackIntegration?.teamName} isReadOnly className="bg-white/[0.07]" />
</FormControl>
)}
<div className="mt-6 flex items-center space-x-4">
<Button type="submit" isLoading={isSubmitting || isConnectLoading} isDisabled={!isDirty}>
{slackIntegration ? "Save" : "Connect"}
{slackIntegration ? "Save" : "Connect Slack"}
</Button>
<Button variant="outline_bg" onClick={onClose}>
Cancel