one-click-accessibility/modules/settings/assets/js/components/upgrade-modal/index.js
VasylD f0dce2793e
[APP-1923][APP-1924] manage remediations, global remediations (#424)
* [APP-1923] change remediation management (#411)

* [APP-1988] Add tabs

* [APP-1988][APP-1989] add tabs, remove menu item

* [APP-1988][APP-1989] add tabs, remove menu item

* [APP-1992] add empty state and tab navigation

* [APP-1993][APP-1994] Change view for manage AI fixes, change delete confirmation modal

* [APP-1996] add view for alt text fixes

* [APP-1996] add edit for alt text fixes

* [APP-1996] add edit for alt text fixes

* [APP-1996] add edit for alt text fixes

* [APP-1996] add edit for alt text fixes

* [APP-1996] add edit for alt text fixes

* [APP-1995] Color contrast form

* [APP-2001] add global remediation logic (#415)

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2001] add global remediation logic

* [APP-2003] add disable across scans (#418)

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* [APP-2003] add disable across scans

* add logs

* add logs

* add logs

* remove logs

* remove logs

* remove logs

* remove logs

* remove logs

* remove logs

* remove logs

* remove logs

* remove logs

* remove logs

* change to theme value

* change to theme value

* change to theme value

* change to theme value

* add edit mode

* add edit mode

* add edit mode
2025-11-10 16:25:45 +07:00

97 lines
2.4 KiB
JavaScript

import Box from '@elementor/ui/Box';
import Button from '@elementor/ui/Button';
import Modal from '@elementor/ui/Modal';
import Paper from '@elementor/ui/Paper';
import Typography from '@elementor/ui/Typography';
import { styled } from '@elementor/ui/styles';
import { StyledContainer } from '@ea11y/pages/pages.styles';
import { GOLINKS } from '@ea11y-apps/global/constants';
import CrownFilled from '@ea11y-apps/global/icons/crown-filled';
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
import { __ } from '@wordpress/i18n';
import imageUrl from '../../../img/upgrade.png';
const UpgradeModal = () => {
const onUpgrade = () => {
mixpanelService.sendEvent(mixpanelEvents.upgradeButtonClicked, {
component: 'Upgrade popup',
feature: 'Analytic',
});
};
return (
<Modal
open
disablePortal
hideBackdrop
aria-labelledby="upgrade-modal-title"
aria-describedby="upgrade-modal-description"
>
<StyledPaper elevation={24}>
<StyledContainer>
<StyledBox>
<img
src={imageUrl}
alt={__('Upgrade image', 'pojo-accessibility')}
/>
<Box>
<Typography
variant="h5"
id="upgrade-modal-title"
align="center"
sx={{ mb: 1 }}
>
{__(
'Discover how visitors use your widget',
'pojo-accessibility',
)}
</Typography>
<Typography
variant="body2"
id="upgrade-modal-description"
align="center"
>
{__(
"Upgrade to a premium plan to access a clear view of your widget's analytics. Track key metrics, understand engagement, and gain insights for improvements.",
'pojo-accessibility',
)}
</Typography>
</Box>
<Button
href={GOLINKS.ANALYTICS_POPUP}
target="_blank"
size="large"
color="promotion"
startIcon={<CrownFilled />}
variant="contained"
sx={{ width: 300 }}
onClick={onUpgrade}
>
{__('Upgrade now', 'pojo-accessibility')}
</Button>
</StyledBox>
</StyledContainer>
</StyledPaper>
</Modal>
);
};
const StyledPaper = styled(Paper)`
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 600px;
max-width: calc(100% - 48px);
padding: 16px;
`;
const StyledBox = styled(Box)`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 40px;
`;
export default UpgradeModal;