ProPluginsStep.js (1649B)
1 const {Fragment} = wp.element; 2 const {__} = wp.i18n; 3 4 import ReduxTemplatesPremiumBox from './ReduxTemplatesPremiumBox'; 5 import {pluginInfo} from '~redux-templates/stores/dependencyHelper'; 6 const REDUXTEMPLATES_PRO_KEY = 'redux-pro'; 7 export default function ProPluginStep(props) { 8 const {missingPros, onCloseWizard} = props; 9 10 if ( missingPros.indexOf(REDUXTEMPLATES_PRO_KEY) >= 0 ) return <ReduxTemplatesPremiumBox /> 11 return ( 12 <Fragment> 13 <div className="redux-templates-modal-body"> 14 <h5>{__('Additional Plugins Required', redux_templates.i18n)}</h5> 15 <p>{__('The following premium plugin(s) are required to import this template:', redux_templates.i18n)}</p> 16 <ul className="redux-templates-import-progress"> 17 { 18 missingPros.map(pluginKey => { 19 let plugin = pluginInfo(pluginKey) 20 return ( 21 <li className='installing' key={pluginKey}> 22 {plugin.name} {plugin.url && 23 <a href={plugin.url} target="_blank"><i className="fas fa-external-link-alt"/></a> 24 } 25 </li>); 26 }) 27 } 28 </ul> 29 30 </div> 31 <div className="redux-templates-modal-footer"> 32 <a className="button button-secondary" onClick={onCloseWizard}> 33 {__('Close', redux_templates.i18n)} 34 </a> 35 </div> 36 </Fragment> 37 ); 38 } 39