From 3bb91f683320f706af312edb7863258c35dbdabd Mon Sep 17 00:00:00 2001
From: okbel
Date: Tue, 1 May 2018 15:43:10 -0300
Subject: [PATCH] Adding withRequestAccountDeletion, withRequestDownloadLink,
withCancelAccountDeletion
---
client/coral-framework/graphql/fragments.js | 5 +-
client/coral-framework/graphql/mutations.js | 51 +++++++++++++++++++
.../components/DeleteMyAccountDialog.css | 4 +-
.../components/DeleteMyAccountFinalStep.js | 24 ++++++---
.../components/DeleteMyAccountStep.css | 47 +++++++++++++++++
.../components/DeleteMyAccountStep1.js | 6 ++-
.../components/DeleteMyAccountStep2.js | 8 ++-
.../components/DeleteMyAccountStep3.js | 6 ++-
8 files changed, 134 insertions(+), 17 deletions(-)
diff --git a/client/coral-framework/graphql/fragments.js b/client/coral-framework/graphql/fragments.js
index a62fd6d92..f30cb1e63 100644
--- a/client/coral-framework/graphql/fragments.js
+++ b/client/coral-framework/graphql/fragments.js
@@ -25,6 +25,9 @@ export default {
'UnsuspendUserResponse',
'UpdateAssetSettingsResponse',
'UpdateAssetStatusResponse',
- 'UpdateSettingsResponse'
+ 'UpdateSettingsResponse',
+ 'RequestAccountDeletionResponse',
+ 'RequestDownloadLinkResponse',
+ 'CancelAccountDeletionResponse'
),
};
diff --git a/client/coral-framework/graphql/mutations.js b/client/coral-framework/graphql/mutations.js
index bd31be630..bf412b189 100644
--- a/client/coral-framework/graphql/mutations.js
+++ b/client/coral-framework/graphql/mutations.js
@@ -623,6 +623,57 @@ export const withUpdateSettings = withMutation(
}
);
+export const withRequestAccountDeletion = withMutation(
+ gql`
+ mutation RequestAccountDeletion {
+ requestAccountDeletion {
+ ...RequestAccountDeletionResponse
+ }
+ }
+ `,
+ {
+ props: ({ mutate }) => ({
+ requestAccountDeletion: () => {
+ return mutate();
+ },
+ }),
+ }
+);
+
+export const withRequestDownloadLink = withMutation(
+ gql`
+ mutation RequestDownloadLink {
+ requestDownloadLink {
+ ...RequestDownloadLinkResponse
+ }
+ }
+ `,
+ {
+ props: ({ mutate }) => ({
+ requestDownloadLink: () => {
+ return mutate();
+ },
+ }),
+ }
+);
+
+export const withCancelAccountDeletion = withMutation(
+ gql`
+ mutation RequestDownloadLink {
+ cancelAccountDeletion {
+ ...CancelAccountDeletionResponse
+ }
+ }
+ `,
+ {
+ props: ({ mutate }) => ({
+ cancelAccountDeletion: () => {
+ return mutate();
+ },
+ }),
+ }
+);
+
export const withUpdateAssetSettings = withMutation(
gql`
mutation UpdateAssetSettings($id: ID!, $input: AssetSettingsInput!) {
diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountDialog.css b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountDialog.css
index db44ebf6d..44dcad0cf 100644
--- a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountDialog.css
+++ b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountDialog.css
@@ -34,6 +34,4 @@
font-size: 1em;
line-height: 20px;
margin: 0;
-}
-
-
+}
\ No newline at end of file
diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountFinalStep.js b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountFinalStep.js
index 004270f4d..22cf476e5 100644
--- a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountFinalStep.js
+++ b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountFinalStep.js
@@ -9,30 +9,40 @@ const DeleteMyAccountFinalStep = () => (
Your request has been submitted and confirmation has been sent to the
email address associated with your account.
- Your account is scheduled to be deleted at:
-
- Account Deletion Date and Time
-
+
+
+
+ Your account is scheduled to be deleted at:
+
+
+
+ Account Deletion Date and Time
+
+
+
Changed your mind? Simply sign in to your account again
before this time and click “
Cancel Account Deletion Request.
”
+
Tell us why. Wed like to know why you chose to delete
your account. Send us feedback on our comment system by emailing.
-
+
+
Done
-
+
Note: You will be immediately signed out of your account.
-
+
);
diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep.css b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep.css
index 8984bf7ac..98b73f376 100644
--- a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep.css
+++ b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep.css
@@ -43,10 +43,22 @@
background-color: #3498DB;
color: white;
}
+
+ &.danger {
+ background-color: #FA4643;
+ color: white;
+ }
}
.actions {
text-align: right;
+ padding-top: 20px;
+
+ &.columnView {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ }
}
.title {
@@ -58,4 +70,39 @@
font-size: 1em;
line-height: 20px;
margin: 0;
+ margin-bottom: 15px;
+}
+
+.box {
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 15px;
+}
+
+.note {
+ margin: 10px 0;
+}
+
+.subTitle {
+ font-size: 1em;
+ margin-bottom: 8px;
+}
+
+.textBox {
+ background-color: #F1F2F2;
+ border: none;
+ width: 100%;
+ padding: 15px;
+ box-sizing: border-box;
+ color: #3B4A53;
+ font-size: 1em;
+}
+
+.block {
+ display: block;
+ margin-top: 2px;
+}
+
+.step {
+ padding-top: 20px;
}
diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep1.js b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep1.js
index d3b399f44..1d26190bc 100644
--- a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep1.js
+++ b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep1.js
@@ -5,12 +5,14 @@ import styles from './DeleteMyAccountStep.css';
const DeleteMyAccountStep1 = props => (
-
When will my account be deleted?
+
When will my account be deleted?
Your account will be deleted 24 hours after your request has been
submitted.
-
Can I still write comments until my account is deleted?
+
+ Can I still write comments until my account is deleted?{' '}
+
No. Once youve requested account deletion, you can no longer write
comments, reply to comments, or select reactions.
diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep2.js b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep2.js
index 47c89e4c1..3337c0b94 100644
--- a/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep2.js
+++ b/plugins/talk-plugin-auth/client/profile-settings/components/DeleteMyAccountStep2.js
@@ -10,8 +10,12 @@ const DeleteMyAccountStep1 = props => (
history for your records. After your account is deleted, you will be
unable to request your comment history.
-
To download your comment history go to:
-
My Profile Download My Comment History
+
+ To download your comment history go to:
+
+ My Profile {`>`} Download My Comment History
+
+
Cancel
(
-
Are you sure you want to delete your account?
+
+ Are you sure you want to delete your account?
+
To confirm you would like to delete your account please type in the
following phrase into the text box below:
@@ -19,7 +21,7 @@ const DeleteMyAccountStep1 = props => (
Cancel
Delete My Account