mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-23 08:02:29 +08:00
* [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com>
47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
import Box from '@elementor/ui/Box';
|
|
import CardContent from '@elementor/ui/CardContent';
|
|
import Typography from '@elementor/ui/Typography';
|
|
import { styled } from '@elementor/ui/styles';
|
|
import { ManageList } from '@ea11y-apps/scanner/components/manage-list';
|
|
import { ManageRemediationButtons } from '@ea11y-apps/scanner/components/manage-remediation-buttons';
|
|
import { BLOCKS } from '@ea11y-apps/scanner/constants';
|
|
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
|
import { useEffect } from '@wordpress/element';
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
export const ManageMainLayout = () => {
|
|
const { remediations, setIsManage, setOpenedBlock } =
|
|
useScannerWizardContext();
|
|
|
|
useEffect(() => {
|
|
if (remediations?.length === 0) {
|
|
setIsManage(false);
|
|
setOpenedBlock(BLOCKS.main);
|
|
}
|
|
}, [remediations?.length]);
|
|
|
|
return (
|
|
<StyledContent>
|
|
<ManageHeader>
|
|
<Typography variant="body2">
|
|
{__('All issues', 'pojo-accessibility')}
|
|
</Typography>
|
|
<ManageRemediationButtons />
|
|
</ManageHeader>
|
|
<ManageList />
|
|
</StyledContent>
|
|
);
|
|
};
|
|
|
|
const ManageHeader = styled(Box)`
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
`;
|
|
|
|
const StyledContent = styled(CardContent)`
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: ${({ theme }) => theme.spacing(2)};
|
|
padding: 0 ${({ theme }) => theme.spacing(2)};
|
|
`;
|