Merge branch 'master' into ffmpeg

This commit is contained in:
Abhinav-grd 2021-08-28 19:39:34 +05:30
commit 21d8706175
2 changed files with 38 additions and 4 deletions

View file

@ -76,13 +76,14 @@ export default function Sidebar(props: Props) {
const win = window.open(feedbackURL, '_blank'); const win = window.open(feedbackURL, '_blank');
win.focus(); 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.rel = 'noreferrer noopener';
a.click(); a.click();
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
function exportFiles() { function exportFiles() {
if (isElectron()) { if (isElectron()) {
@ -215,7 +216,7 @@ export default function Sidebar(props: Props) {
</LinkButton> </LinkButton>
<LinkButton <LinkButton
style={{ marginTop: '30px' }} style={{ marginTop: '30px' }}
onClick={openSupportMail}> onClick={() => initiateEmail('contact@ente.io')}>
{constants.SUPPORT} {constants.SUPPORT}
</LinkButton> </LinkButton>
<> <>
@ -309,6 +310,26 @@ export default function Sidebar(props: Props) {
}> }>
{constants.LOGOUT} {constants.LOGOUT}
</LinkButton> </LinkButton>
<LinkButton
variant="danger"
style={{ marginTop: '30px' }}
onClick={() =>
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}
</LinkButton>
<div <div
style={{ style={{
marginTop: '40px', marginTop: '40px',

View file

@ -191,6 +191,19 @@ const englishConstants = {
SKIP: 'skip', SKIP: 'skip',
CANCEL: 'cancel', CANCEL: 'cancel',
LOGOUT: 'logout', LOGOUT: 'logout',
DELETE_ACCOUNT: 'delete account',
DELETE_MESSAGE: () => (
<>
<p>
please send an email to{' '}
<a href="mailto:account-deletion@ente.io">
account-deletion@ente.io
</a>{' '}
from your registered email address.{' '}
</p>
your request will be processed within 72 hours.
</>
),
LOGOUT_MESSAGE: 'sure you want to logout?', LOGOUT_MESSAGE: 'sure you want to logout?',
CHANGE: 'change', CHANGE: 'change',
CHANGE_EMAIL: 'change email?', CHANGE_EMAIL: 'change email?',