diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index c52721dfb..93d0d72c0 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -76,13 +76,14 @@ export default function Sidebar(props: Props) { const win = window.open(feedbackURL, '_blank'); win.focus(); } - function openSupportMail() { - const a = document.createElement('a'); - a.href = 'mailto:contact@ente.io'; + function initiateEmail(email: string) { + const a = document.createElement('a'); + a.href = 'mailto:' + email; a.rel = 'noreferrer noopener'; a.click(); } + // eslint-disable-next-line @typescript-eslint/no-unused-vars function exportFiles() { if (isElectron()) { @@ -215,7 +216,7 @@ export default function Sidebar(props: Props) { + onClick={() => initiateEmail('contact@ente.io')}> {constants.SUPPORT} <> @@ -309,6 +310,26 @@ export default function Sidebar(props: Props) { }> {constants.LOGOUT} + + props.setDialogMessage({ + title: `${constants.DELETE_ACCOUNT}`, + content: constants.DELETE_MESSAGE(), + staticBackdrop: true, + proceed: { + text: constants.DELETE_ACCOUNT, + action: () => { + initiateEmail('account-deletion@ente.io'); + }, + variant: 'danger', + }, + close: { text: constants.CANCEL }, + }) + }> + {constants.DELETE_ACCOUNT} +
( + <> +

+ please send an email to{' '} + + account-deletion@ente.io + {' '} + from your registered email address.{' '} +

+ your request will be processed within 72 hours. + + ), LOGOUT_MESSAGE: 'sure you want to logout?', CHANGE: 'change', CHANGE_EMAIL: 'change email?',