cancel Button added

This commit is contained in:
jubitjohn 2023-06-22 21:33:19 +05:30
parent 69c3798d22
commit f3b7e823c9
3 changed files with 23 additions and 12 deletions

View file

@ -56,7 +56,7 @@ export default function AdvancedMApSettings({ open, onClose, onRootClose }) {
<EnteMenuItem
endIcon={<ChevronRight />}
onClick={openMapSettings}
label={t('Map Setting')}
label={t('Map Settings')}
/>
</MenuItemGroup>
</Box>

View file

@ -1,16 +1,14 @@
import { Stack, Box, Button, Typography } from '@mui/material';
import Titlebar from 'components/Titlebar';
import { ML_BLOG_LINK } from 'constants/urls';
import { Trans } from 'react-i18next';
import { t } from 'i18next';
import { openLink } from 'utils/common';
export default function EnableMap({ onClose, enableMap, onRootClose }) {
return (
<Stack spacing={'4px'} py={'12px'}>
<Titlebar
onClose={onClose}
title={t('MAP')}
title={t('Map Settings')}
onRootClose={onRootClose}
/>
<Stack py={'20px'} px={'8px'} spacing={'32px'}>
@ -19,7 +17,23 @@ export default function EnableMap({ onClose, enableMap, onRootClose }) {
<Typography color="text.muted">
<Trans
i18nKey={
'This will show your photos on a worldmap.The map is hosted by OpenStreetMap, and the exact locations of your photos are never shared.You can disable this feature anytime from Settings.'
'This will show your photos on a worldmap.'
}
/>
<br />
<br />
<Trans
i18nKey={
'The map is hosted by OpenStreetMap, and the exact locations of your photos are never shared.'
}
/>
<br />
<br />
<Trans
i18nKey={
'You can disable this feature anytime from Settings.'
}
/>
</Typography>
@ -28,11 +42,8 @@ export default function EnableMap({ onClose, enableMap, onRootClose }) {
<Button color={'accent'} size="large" onClick={enableMap}>
{t('ENABLE')}
</Button>
<Button
color={'secondary'}
size="large"
onClick={() => openLink(ML_BLOG_LINK, true)}>
{t('Learn More')}
<Button color={'secondary'} size="large" onClick={onClose}>
{t('Cancel')}
</Button>
</Stack>
</Stack>

View file

@ -9,7 +9,7 @@ export default function ManageMapEnabled({ onClose, disableMap, onRootClose }) {
<Stack spacing={'4px'} py={'12px'}>
<Titlebar
onClose={onClose}
title={t('MAP')}
title={t('Map Settings')}
onRootClose={onRootClose}
/>
<Box px={'16px'}>
@ -17,7 +17,7 @@ export default function ManageMapEnabled({ onClose, disableMap, onRootClose }) {
<MenuItemGroup>
<EnteMenuItem
onClick={disableMap}
label={t('DISABLE MAP')}
label={t('Disable Map')}
/>
</MenuItemGroup>
</Stack>