mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-23 17:03:34 +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>
25 lines
847 B
JavaScript
25 lines
847 B
JavaScript
import Box from '@elementor/ui/Box';
|
|
import Typography from '@elementor/ui/Typography';
|
|
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
|
import { StyledSkeleton } from '@ea11y-apps/scanner/styles/app.styles';
|
|
import { __, sprintf } from '@wordpress/i18n';
|
|
|
|
export const ManagementStats = () => {
|
|
const { loading, remediations } = useScannerWizardContext();
|
|
|
|
return loading ? (
|
|
<Box flexGrow={1} sx={{ py: 1 }}>
|
|
<StyledSkeleton width="100%" height={14} />
|
|
</Box>
|
|
) : (
|
|
<Typography variant="body2" color="text.secondary">
|
|
{sprintf(
|
|
// Translators: %1$s - active, %2$s - total
|
|
__('%1$s/%2$s fixes are currently active', 'pojo-accessibility'),
|
|
remediations?.filter((remediation) => Number(remediation.active))
|
|
.length,
|
|
remediations?.length,
|
|
)}
|
|
</Typography>
|
|
);
|
|
};
|