|
9 | 9 | faTwitter,
|
10 | 10 | faFacebook,
|
11 | 11 | faReddit,
|
12 |
| - faPaypal, |
13 | 12 | } from '@fortawesome/free-brands-svg-icons';
|
14 | 13 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
15 | 14 | import { withStyles } from '@material-ui/core/styles';
|
@@ -123,21 +122,24 @@ const { Menu, getCurrentWindow } = remote;
|
123 | 122 | let allowFileDropFlag = false;
|
124 | 123 | let multipleSelectDirection = null;
|
125 | 124 |
|
126 |
| -const donationBtnsList = [ |
| 125 | +const supportBtnsList = [ |
127 | 126 | {
|
128 | 127 | enabled: true,
|
129 |
| - label: supportUsingPayPal, |
130 |
| - icon: faPaypal, |
131 |
| - url: SUPPORT_PAYPAL_URL, |
| 128 | + label: buyMeACoffeeText, |
| 129 | + url: BUY_ME_A_COFFEE_URL, |
| 130 | + image: 'FileExplorer/buymeacoffee-button.png', |
| 131 | + icon: null, |
132 | 132 | invert: false,
|
| 133 | + name: 'buymeacoffee', |
133 | 134 | },
|
134 | 135 | {
|
135 | 136 | enabled: true,
|
136 |
| - label: buyMeACoffeeText, |
137 |
| - url: BUY_ME_A_COFFEE_URL, |
138 |
| - image: 'toolbar/buymeacoffee.png', |
| 137 | + label: supportUsingPayPal, |
| 138 | + image: 'FileExplorer/paypal-logo.png', |
139 | 139 | icon: null,
|
| 140 | + url: SUPPORT_PAYPAL_URL, |
140 | 141 | invert: false,
|
| 142 | + name: 'paypal', |
141 | 143 | },
|
142 | 144 | ];
|
143 | 145 |
|
@@ -2060,46 +2062,46 @@ class FileExplorer extends Component {
|
2060 | 2062 | helpText="If the progress bar freezes while transferring the files, restart the app and reconnect the device. This is a known Android MTP bug."
|
2061 | 2063 | >
|
2062 | 2064 | <div className={styles.socialMediaShareContainer}>
|
2063 |
| - <Typography className={styles.donationBtnsTitle}> |
| 2065 | + <Typography className={styles.supportBtnsTitle}> |
2064 | 2066 | {`I've invested a significant amount of my time and energy into developing and maintaining this OpenSource application.`}
|
2065 |
| - <span className={styles.donationBtnsTitleNewLine}> |
| 2067 | + <span className={styles.supportBtnsTitleNewLine}> |
2066 | 2068 | {`I hate to run ads.`} Help me keep {APP_NAME}
|
2067 | 2069 |
|
2068 |
| - <span className={styles.donationBtnsBoldText}>Free</span> |
| 2070 | + <span className={styles.supportBtnsBoldText}>Free</span> |
2069 | 2071 | and
|
2070 |
| - <span className={styles.donationBtnsBoldText}>Open</span>, |
2071 |
| - forever! |
| 2072 | + <span className={styles.supportBtnsBoldText}>Open</span>! |
2072 | 2073 | </span>
|
2073 | 2074 | </Typography>
|
2074 |
| - <div className={styles.socialMediaShareBtnsContainer}> |
2075 |
| - {donationBtnsList.map((a, index) => ( |
| 2075 | + <div className={styles.supportBtnsContainer}> |
| 2076 | + {supportBtnsList.map((a, index) => ( |
2076 | 2077 | // eslint-disable-next-line react/no-array-index-key
|
2077 | 2078 | <Tooltip key={index} title={a.label}>
|
2078 | 2079 | <div>
|
2079 |
| - <IconButton |
| 2080 | + <div |
2080 | 2081 | aria-label={a.label}
|
2081 |
| - disabled={!a.enabled} |
2082 |
| - onClick={() => openExternalUrl(a.url)} |
2083 |
| - className={classnames(styles.socialMediaBtnWrapper, { |
2084 |
| - [styles.socialMediaBtnWrapperForImage]: !!a.image, |
| 2082 | + onClick={() => { |
| 2083 | + analyticsService.sendEvent( |
| 2084 | + EVENT_TYPE.SUPPORT_CTAS_DURING_TRANSFERRING, |
| 2085 | + { |
| 2086 | + name: a.name, |
| 2087 | + } |
| 2088 | + ); |
| 2089 | + openExternalUrl(a.url); |
| 2090 | + }} |
| 2091 | + className={classnames(styles.supportBtnWrapper, { |
| 2092 | + [styles.supportBtnWrapperForImage]: !!a.image, |
2085 | 2093 | })}
|
2086 | 2094 | >
|
2087 | 2095 | {a.image && (
|
2088 | 2096 | <img
|
2089 | 2097 | alt={a.label}
|
2090 | 2098 | src={imgsrc(a.image, false)}
|
2091 |
| - className={styles.socialMediaShareBtnImages} |
2092 |
| - /> |
2093 |
| - )} |
2094 |
| - |
2095 |
| - {a.icon && ( |
2096 |
| - <FontAwesomeIcon |
2097 |
| - icon={a.icon} |
2098 |
| - className={styles.socialMediaShareBtn} |
2099 |
| - title={a.label} |
| 2099 | + className={classnames(styles.supportBtnImages, { |
| 2100 | + [`${a.name}`]: true, |
| 2101 | + })} |
2100 | 2102 | />
|
2101 | 2103 | )}
|
2102 |
| - </IconButton> |
| 2104 | + </div> |
2103 | 2105 | </div>
|
2104 | 2106 | </Tooltip>
|
2105 | 2107 | ))}
|
|
0 commit comments