Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-plugins/real-cookie-banner/src/public/ts/components/config/dashboard/checklist"

Index

Variables

Const DashboardChecklistCardContent

DashboardChecklistCardContent: FC<{ onLinkClick?: ComponentProps<typeof DashboardChecklistItem>["onLinkClick"]; showHidden?: boolean }> = observer(({ onLinkClick, ...props }) => {const { checklistStore } = useStores();const {busyChecklist,items,completed,checkable,done,checklist: { overdue }} = checklistStore;const [showHidden, setShowHidden] = useState(typeof props.showHidden === "boolean" ? props.showHidden : done ? false : true);return (<Spin spinning={busyChecklist}><Space direction="vertical" size="large">{overdue && (<div className="notice notice-warning inline below-h2 notice-alt" style={{ margin: 0 }}><p>{__("How time flies! You have installed Real Cookie Banner some time ago, but you still haven't finished the configuration yet.")}</p></div>)}<p className="description">{__("We have collected all relevant steps for the legally compliant use of Real Cookie Banner after the first installation. Set up the cookie banner step by step to add a cookie banner to your website in compliance with the ePrivacy Directive and GDPR.")}</p><div>{done &&(showHidden ? (<Tagicon={<MinusCircleOutlined />}color="default"style={{ cursor: "pointer" }}onClick={() => setShowHidden(false)}>{__("Hide completed steps")}</Tag>) : (<Tagicon={<CheckCircleOutlined />}color="success"style={{ cursor: "pointer" }}onClick={() => setShowHidden(true)}>{__("%d / %d steps completed",completed.length > checkable.length ? checkable.length : completed.length, // avoid overflow due infoscheckable.length)}</Tag>))}{items.map(({ id, ...rest }) => {if (!showHidden && rest.checked) {return null;}return (<DashboardChecklistItemkey={id}id={id}{...rest}onLinkClick={(e) => {if (["get-pro"].indexOf(id) > -1) {checklistStore.toggleChecklistItem(id, true);}onLinkClick?.(e);}}/>);})}</div></Space></Spin>);})

Generated using TypeDoc