Skip to content

Commit

Permalink
Update remove data dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
louilinn committed Sep 28, 2023
1 parent 8b7e36e commit c68b1fb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 36 deletions.
13 changes: 7 additions & 6 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,13 @@
"bodyUndeployedToken": "Account not verified"
},
"RemoveYourData": {
"titleText": "Do you want to delete your personal profile data?",
"bodyText": "This action will delete your personal avatar, username and email from our databases.",
"bodyText2": "This action will not delete any transaction data or trust interactions. Such data is stored on Gnosis Chain blockchain and cannot be deleted by anyone. However, your blockchain transactions will no longer be traceable or linked to your username or avatar.",
"bodyText3": "Upon deletion you can chose to log out. You may still recover your account in the future by using your magic words and edit your profile with a new profile data. If you do not log in within 90 days, your UBI payouts will be stopped forever. It is also possible to continue to use circles.garden without an alias, avatar or email.",
"bodyText4": "Please note that data deletion will not happen across wallets. You will have to do profile data deletion for your personal wallet and any shared wallets separately before logging out.",
"btnText": "I would like to proceed with my account data deletion",
"titleText": "Are you sure you want to delete your profile data?",
"bodyText": "This action will delete your profile picture, username and email from our databases.",
"bodyText2": "However, this action will not delete historical transaction data or trust interactions.",
"bodyText3": "After deletion you can chose to end session. You may still recover your account in the future by using your magic words. If you do not log in within 90 days, your UBI payouts will be stopped forever.",
"bodyText4": "Please note that data deletion will not happen across wallets. You will have to do profile data deletion your personal wallet and any shared wallets separately before ending session.",
"readMore": "Read more",
"btnText": "Delete Profile Data",
"confirmationText": "You have successfully deleted your profile data",
"confirmationDelete": "Delete",
"confirmationCancel": "Cancel"
Expand Down
49 changes: 27 additions & 22 deletions src/components/RemoveYourData.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,17 @@ import { useDispatch } from 'react-redux';

import Button from '~/components/Button';
import DialogInfo from '~/components/DialogInfo';
import ExternalLink from '~/components/ExternalLink';
import translate from '~/services/locale';
import notify, { NotificationsTypes } from '~/store/notifications/actions';
import { FAQ_URL } from '~/utils/constants';
import logError, { translateErrorForUser } from '~/utils/debug';

const useStyles = makeStyles(() => ({
textContainer: {
maxWidth: '250px',
margin: '0 auto',
marginBottom: '20px',
},
btnContainer: {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-end',
marginTop: '32px',
marginBottom: '40px',
},
}));

Expand Down Expand Up @@ -78,21 +73,31 @@ const RemoveYourData = () => {
<Typography align="center" mb={2}>
{translate('RemoveYourData.bodyText4')}
</Typography>
<Box className={classes.btnContainer}>
<Button
className={classes.continueButton}
fullWidth
onClick={dialogCloseInfoHandler}
>
{translate('RemoveYourData.confirmationDelete')}
</Button>
<Button
fullWidth
isText
onClick={() => setIsOpenDialogCloseInfo(false)}
<ExternalLink href={FAQ_URL}>
<Typography
align="center"
classes={{ root: 'body3_link_gradient' }}
paragraph
variant="body3"
>
{translate('RemoveYourData.confirmationCancel')}
</Button>
{translate('RemoveYourData.readMore')}
</Typography>
</ExternalLink>
<Box pt={3}>
<Box display="flex" flexDirection="column" pb={1}>
<Button
className={classes.continueButton}
fullWidth
onClick={dialogCloseInfoHandler}
>
{translate('RemoveYourData.confirmationDelete')}
</Button>
</Box>
<Box display="flex" flexDirection="column">
<Button isText m={2} onClick={() => setIsOpenDialogCloseInfo(false)}>
{translate('RemoveYourData.confirmationCancel')}
</Button>
</Box>
</Box>
</Box>
);
Expand Down
17 changes: 9 additions & 8 deletions src/views/EditProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const useStyles = makeStyles((theme) => ({
display: 'none',
},
saveButton: {
marginBottom: '20px',
marginBottom: '8px',
},
informationContainer: {
maxWidth: '350px',
Expand All @@ -82,6 +82,10 @@ const useStyles = makeStyles((theme) => ({
position: 'relative',
zIndex: theme.zIndex.layer1,
},
removeYourData: {
position: 'relative',
marginTop: '5px',
},
}));

const DialogContentUpload = ({ onFileUpload, handleClose, uploadImgSrc }) => {
Expand Down Expand Up @@ -321,9 +325,9 @@ const EditProfile = () => {
}
}

const dialogOpenInfoHandler = () => {
setIsOpenDialogCloseInfo(true);
};
// const dialogOpenInfoHandler = () => {
// setIsOpenDialogCloseInfo(true);
// };

const dialogCloseInfoHandler = () => {
setIsClose(true);
Expand Down Expand Up @@ -511,7 +515,6 @@ const EditProfile = () => {
</>
)}
</Box>
<RemoveYourData />
</Box>
</Container>
</View>
Expand All @@ -524,9 +527,7 @@ const EditProfile = () => {
>
{translate('EditProfile.buttonSave')}
</Button>
<Button fullWidth isText onClick={dialogOpenInfoHandler}>
{translate('EditProfile.buttonCancel')}
</Button>
<RemoveYourData className={classes.removeYourData} />
</Footer>
</>
);
Expand Down

0 comments on commit c68b1fb

Please sign in to comment.