Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-packages/real-product-manager-wp-client/lib/components/pluginUpdate/licenseTelemetryDataModal"

Index

Variables

Const PluginUpdateLicenseTelemetryDataModal

PluginUpdateLicenseTelemetryDataModal: FC<{ disabled?: boolean; license: License; linkWrapper?: boolean }> = observer(({ license, linkWrapper, disabled, children }) => {const { busy, telemetryData, telemetryDataSharingOptIn } = license;const [isVisible, setVisible] = useState(false);useEffect(() => {if (isVisible && !telemetryData) {license.fetchTelemetryData();}}, [isVisible, telemetryData, license]);return (<><Modaltitle={__("Telemetry data preview")}visible={isVisible && !disabled}onCancel={() => setVisible(false)}cancelText={__("Close")}okButtonProps={{ style: { display: "none" } }}>{telemetryDataSharingOptIn && (<p style={{ marginTop: 0, marginBottom: 10 }}>{__("At the time of activating the license, you agreed that we may send telemetry data from your installation to our server. You can revoke this at any time by deactivating and reactivating the licence.")}</p>)}<p style={{ marginTop: 0 }}>{__("The following data (raw) will be sent to our server:")}</p><Spin spinning={busy}><textareareadOnlystyle={{ width: "100%", height: 300 }}value={telemetryData ? JSON.stringify(telemetryData, null, 4) : ""}/></Spin></Modal><spanonClick={(e) => {if (!disabled) {setVisible(true);}e.preventDefault();}}>{linkWrapper ? (<a style={{ textDecoration: "underline", cursor: "pointer" }}>{children}</a>) : (children)}</span></>);})

Generated using TypeDoc