Просмотр исходного кода

Delete flow Final (#3252)

* delete email

* Update Delete

* Update delete.go

* Update delete.go

* Update Tests

* Delete Flow Email

* Update

* PDeletion Email
sdess09 3 лет назад
Родитель
Сommit
b89aae3434

+ 1 - 2
api/server/handlers/project/delete.go

@@ -70,10 +70,9 @@ func (p *ProjectDeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
 			}
 			}
 		}
 		}
 	}
 	}
-	fmt.Println("Deleteing", user.Email)
 	err := p.Config().UserNotifier.SendProjectDeleteEmail(
 	err := p.Config().UserNotifier.SendProjectDeleteEmail(
 		&notifier.SendProjectDeleteEmailOpts{
 		&notifier.SendProjectDeleteEmailOpts{
-			Email:   "support@porter.run",
+			Email:   user.Email,
 			Project: proj.Name,
 			Project: proj.Name,
 		},
 		},
 	)
 	)

+ 9 - 3
dashboard/src/main/home/project-settings/ProjectDeleteConsent.tsx

@@ -36,7 +36,12 @@ const ProjectDeleteConsent: React.FC<Props> = ({
       >
       >
         <Text size={16}>Delete {currentProject.name}?</Text>
         <Text size={16}>Delete {currentProject.name}?</Text>
         <Spacer y={1} />
         <Spacer y={1} />
-        <Text color="red">
+
+        <Text size={14} color="red">
+          Attention:
+        </Text>
+        <Spacer y={.1} />
+        <Text>
           Destruction of resources sometimes results in dangling resources. To
           Destruction of resources sometimes results in dangling resources. To
           ensure that everything has been properly destroyed, please visit
           ensure that everything has been properly destroyed, please visit
           your cloud provider's console.
           your cloud provider's console.
@@ -50,8 +55,7 @@ const ProjectDeleteConsent: React.FC<Props> = ({
           Deletion instructions
           Deletion instructions
         </Link>
         </Link>
         <Spacer y={1} />
         <Spacer y={1} />
-        <Text color="yellow"> This action cannot be undone.</Text>
-        <Spacer y={1} />
+
         <Text color="helper">
         <Text color="helper">
           To acknowledge, enter the project name in the text input field.
           To acknowledge, enter the project name in the text input field.
         </Text>
         </Text>
@@ -63,6 +67,7 @@ const ProjectDeleteConsent: React.FC<Props> = ({
           height="40px"
           height="40px"
         />
         />
         <Spacer y={1} />
         <Spacer y={1} />
+
         <Button
         <Button
           disabled={confirmDelete !== currentProject?.name}
           disabled={confirmDelete !== currentProject?.name}
           onClick={() => {
           onClick={() => {
@@ -71,6 +76,7 @@ const ProjectDeleteConsent: React.FC<Props> = ({
               currentProject: currentProject,
               currentProject: currentProject,
             });
             });
           }}
           }}
+          status={confirmDelete == currentProject?.name ? "This action cannot be undone" : ""}
         >
         >
           Continue
           Continue
         </Button>
         </Button>