Przeglądaj źródła

make email invites lowercase

Justin Rhee 3 lat temu
rodzic
commit
d5fd7931a5

+ 1 - 0
dashboard/src/main/home/launch/launch-flow/LaunchFlow.tsx

@@ -365,6 +365,7 @@ const LaunchFlow: React.FC<PropsType> = (props) => {
     let { form, currentTab } = props;
     let { form, currentTab } = props;
 
 
     if (currentPage === "source" && currentTab === "porter") {
     if (currentPage === "source" && currentTab === "porter") {
+      console.log("champagne");
       return (
       return (
         <SourcePage
         <SourcePage
           sourceType={sourceType}
           sourceType={sourceType}

+ 2 - 2
dashboard/src/main/home/modals/EditInviteOrCollaboratorModal.tsx

@@ -89,7 +89,7 @@ const EditCollaboratorModal = () => {
   return (
   return (
     <>
     <>
       <ModalTitle>
       <ModalTitle>
-        Update {isInvite ? "Invite for" : "Collaborator"} {user?.email}
+        Update {isInvite ? "invite for" : "collaborator"} {user?.email}
       </ModalTitle>
       </ModalTitle>
       <Subtitle>Specify a different role for this user.</Subtitle>
       <Subtitle>Specify a different role for this user.</Subtitle>
       <RoleSelectorWrapper>
       <RoleSelectorWrapper>
@@ -101,7 +101,7 @@ const EditCollaboratorModal = () => {
       </RoleSelectorWrapper>
       </RoleSelectorWrapper>
 
 
       <SaveButton
       <SaveButton
-        text={`Update ${isInvite ? "Invite" : "Collaborator"}`}
+        text={`Update ${isInvite ? "invite" : "collaborator"}`}
         color="#616FEEcc"
         color="#616FEEcc"
         onClick={() => handleUpdate()}
         onClick={() => handleUpdate()}
         status={status}
         status={status}

+ 5 - 5
dashboard/src/main/home/project-settings/InviteList.tsx

@@ -119,7 +119,7 @@ const InvitePage: React.FunctionComponent<Props> = ({}) => {
 
 
   const createInvite = () => {
   const createInvite = () => {
     api
     api
-      .createInvite("<token>", { email, kind: role }, { id: currentProject.id })
+      .createInvite("<token>", { email: email.toLowerCase(), kind: role }, { id: currentProject.id })
       .then(() => {
       .then(() => {
         getData();
         getData();
         setEmail("");
         setEmail("");
@@ -395,7 +395,7 @@ const InvitePage: React.FunctionComponent<Props> = ({}) => {
   return (
   return (
     <>
     <>
       <>
       <>
-        <Heading isAtTop={true}>Share Project</Heading>
+        <Heading isAtTop={true}>Share project</Heading>
         <Helper>Generate a project invite for another user.</Helper>
         <Helper>Generate a project invite for another user.</Helper>
         <InputRowWrapper>
         <InputRowWrapper>
           <InputRow
           <InputRow
@@ -403,7 +403,7 @@ const InvitePage: React.FunctionComponent<Props> = ({}) => {
             type="text"
             type="text"
             setValue={(newEmail: string) => setEmail(newEmail)}
             setValue={(newEmail: string) => setEmail(newEmail)}
             width="100%"
             width="100%"
-            placeholder="ex: mrp@getporter.dev"
+            placeholder="ex: mrp@porter.run"
           />
           />
         </InputRowWrapper>
         </InputRowWrapper>
         <Helper>Specify a role for this user.</Helper>
         <Helper>Specify a role for this user.</Helper>
@@ -416,7 +416,7 @@ const InvitePage: React.FunctionComponent<Props> = ({}) => {
         </RoleSelectorWrapper>
         </RoleSelectorWrapper>
         <ButtonWrapper>
         <ButtonWrapper>
           <InviteButton disabled={!hasSeats} onClick={() => validateEmail()}>
           <InviteButton disabled={!hasSeats} onClick={() => validateEmail()}>
-            Create Invite
+            Create invite
           </InviteButton>
           </InviteButton>
           {isInvalidEmail && (
           {isInvalidEmail && (
             <Invalid>Invalid email address. Please try again.</Invalid>
             <Invalid>Invalid email address. Please try again.</Invalid>
@@ -429,7 +429,7 @@ const InvitePage: React.FunctionComponent<Props> = ({}) => {
         </ButtonWrapper>
         </ButtonWrapper>
       </>
       </>
 
 
-      <Heading>Invites & Collaborators</Heading>
+      <Heading>Invites & collaborators</Heading>
       <Helper>Manage pending invites and view collaborators.</Helper>
       <Helper>Manage pending invites and view collaborators.</Helper>
       {isLoading && <Loading height={"30%"} />}
       {isLoading && <Loading height={"30%"} />}
       {data?.length && !isLoading ? (
       {data?.length && !isLoading ? (

+ 5 - 5
dashboard/src/main/home/project-settings/ProjectSettings.tsx

@@ -64,7 +64,7 @@ class ProjectSettings extends Component<PropsType, StateType> {
     let { currentProject } = this.context;
     let { currentProject } = this.context;
     this.setState({ projectName: currentProject.name });
     this.setState({ projectName: currentProject.name });
     const tabOptions = [];
     const tabOptions = [];
-    tabOptions.push({ value: "manage-access", label: "Manage Access" });
+    tabOptions.push({ value: "manage-access", label: "Manage access" });
     tabOptions.push({
     tabOptions.push({
       value: "billing",
       value: "billing",
       label: "Billing",
       label: "Billing",
@@ -87,7 +87,7 @@ class ProjectSettings extends Component<PropsType, StateType> {
 
 
       tabOptions.push({
       tabOptions.push({
         value: "additional-settings",
         value: "additional-settings",
-        label: "Additional Settings",
+        label: "Additional settings",
       });
       });
     }
     }
 
 
@@ -132,7 +132,7 @@ class ProjectSettings extends Component<PropsType, StateType> {
     } else {
     } else {
       return (
       return (
         <>
         <>
-          <Heading isAtTop={true}>Delete Project</Heading>
+          <Heading isAtTop={true}>Delete project</Heading>
           <Helper>
           <Helper>
             Permanently delete this project. This will destroy all clusters tied
             Permanently delete this project. This will destroy all clusters tied
             to this project that have been provisioned by Porter. Note that this
             to this project that have been provisioned by Porter. Note that this
@@ -164,7 +164,7 @@ class ProjectSettings extends Component<PropsType, StateType> {
               });
               });
             }}
             }}
           >
           >
-            Delete Project
+            Delete project
           </DeleteButton>
           </DeleteButton>
         </>
         </>
       );
       );
@@ -174,7 +174,7 @@ class ProjectSettings extends Component<PropsType, StateType> {
   render() {
   render() {
     return (
     return (
       <StyledProjectSettings>
       <StyledProjectSettings>
-        <TitleSection>Project Settings</TitleSection>
+        <TitleSection>Project settings</TitleSection>
         <TabRegion
         <TabRegion
           currentTab={this.state.currentTab}
           currentTab={this.state.currentTab}
           setCurrentTab={(x: string) => this.setState({ currentTab: x })}
           setCurrentTab={(x: string) => this.setState({ currentTab: x })}