index.js (4465B)
1 import {Fab, Action} from 'react-tiny-fab'; 2 import config from './config'; 3 import './styles.scss'; 4 import {__} from '@wordpress/i18n'; 5 6 import * as Icons from '~redux-templates/icons' 7 import { ModalManager } from '~redux-templates/modal-manager'; 8 import FeedbackDialog from '~redux-templates/modal-feedback'; 9 10 const schema = { 11 type: 'object', 12 properties: { 13 comment: { 14 type: 'string' 15 }, 16 agreeToContactFurther: { 17 type: 'boolean', 18 title: __('Yes, I give Redux permission to contact me for any follow up questions.', redux_templates.i18n) 19 } 20 } 21 } 22 const uiSchema = { 23 'comment': { 24 'ui:widget': 'textarea', 25 'ui:options': { 26 label: false 27 } 28 } 29 }; 30 31 export default function FabWrapper() { 32 const {mainButtonStyles, actionButtonStyles, position, event, alwaysShowTitle} = config; 33 34 return ( 35 <Fab 36 mainButtonStyles={mainButtonStyles} 37 position={position} 38 icon={Icons.ReduxTemplatesIcon()} 39 event={event} 40 // onClick={testing} 41 42 text={__('See Quick Links', redux_templates.i18n)} 43 > 44 45 {/*<Action*/} 46 {/* style={actionButtonStyles}*/} 47 {/* text={__('Suggest a Feature', redux_templates.i18n)}*/} 48 {/* onClick={e => {*/} 49 {/* window.open(redux_templates.u, "_blank")*/} 50 {/* }}*/} 51 {/*>*/} 52 {/* <i className="fa fa-lightbulb-o"/>*/} 53 {/*</Action>*/} 54 {/*<Action*/} 55 {/* style={actionButtonStyles}*/} 56 {/* text={__('Contact Us', redux_templates.i18n)}*/} 57 {/* onClick={e => {*/} 58 {/* ModalManager.openFeedback(<FeedbackDialog */} 59 {/* title={__('Help us improve Redux', redux_templates.i18n)} */} 60 {/* description={__('Thank you for reaching out. We will do our best to contact you ba.', redux_templates.i18n)}*/} 61 {/* schema={schema}*/} 62 {/* uiSchema={uiSchema}*/} 63 {/* headerImage={<img className="header-background" src={`${redux_templates.plugin}assets/img/popup-contact.png` } />}*/} 64 {/* buttonLabel={__('Submit Feedback', redux_templates.i18n)}*/} 65 {/* />)*/} 66 {/* }}*/} 67 {/*>*/} 68 {/* <i className="fa fa-comments"/>*/} 69 {/*</Action>*/} 70 <Action 71 style={actionButtonStyles} 72 text={__('Get Support', redux_templates.i18n)} 73 onClick={e => { 74 window.open('https://wordpress.org/support/plugin/redux-framework/#new-topic-0', '_blank') 75 }} 76 > 77 <i className="far fa-question-circle "/> 78 </Action> 79 <Action 80 style={actionButtonStyles} 81 text={__('Join our Community', redux_templates.i18n)} 82 onClick={e => { 83 window.open('https://www.facebook.com/groups/reduxframework', '_blank') 84 }} 85 > 86 <i className="fa fa-comments"/> 87 </Action> 88 { 89 redux_templates.mokama === '1' && 90 <Action 91 style={actionButtonStyles} 92 text={__('Visit our Website', redux_templates.i18n)} 93 onClick={e => { 94 window.open( redux_templates.u + 'tinyfab', '_blank') 95 }} 96 > 97 <i className="fas fa-external-link-alt"/> 98 </Action> 99 } 100 {/*{*/} 101 {/* redux_templates.left !== 999 &&*/} 102 {/* <Action*/} 103 {/* style={actionButtonStyles}*/} 104 {/* className="tour-icon"*/} 105 {/* text={__( 'Take the Redux Challenge', redux_templates.i18n )}*/} 106 {/* onClick={e => {*/} 107 {/* setTourOpen();*/} 108 {/* }}*/} 109 {/* >*/} 110 {/* <i className="fas fa-map-signs tour-icon"/>*/} 111 {/* </Action>*/} 112 {/*}*/} 113 114 { 115 redux_templates.mokama !== '1' && 116 <Action 117 style={{backgroundColor:'#00a7e5'}} 118 text={__('Upgrade to Redux Pro', redux_templates.i18n)} 119 onClick={e => { 120 window.open(redux_templates.u + 'help_bubble', '_blank') 121 }} 122 > 123 <i className="fa fa-star"/> 124 </Action> 125 } 126 </Fab> 127 ); 128 }