Skip to content

Commit 340d9d9

Browse files
authored
Merge pull request #382 from ganeshrvel/release/3.2.25
Update support message in file transfer dialog
2 parents 3e3378a + d517a9c commit 340d9d9

File tree

5 files changed

+63
-33
lines changed

5 files changed

+63
-33
lines changed

app/containers/HomePage/components/FileExplorer.jsx

+32-30
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
faTwitter,
1010
faFacebook,
1111
faReddit,
12-
faPaypal,
1312
} from '@fortawesome/free-brands-svg-icons';
1413
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
1514
import { withStyles } from '@material-ui/core/styles';
@@ -123,21 +122,24 @@ const { Menu, getCurrentWindow } = remote;
123122
let allowFileDropFlag = false;
124123
let multipleSelectDirection = null;
125124

126-
const donationBtnsList = [
125+
const supportBtnsList = [
127126
{
128127
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,
132132
invert: false,
133+
name: 'buymeacoffee',
133134
},
134135
{
135136
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',
139139
icon: null,
140+
url: SUPPORT_PAYPAL_URL,
140141
invert: false,
142+
name: 'paypal',
141143
},
142144
];
143145

@@ -2060,46 +2062,46 @@ class FileExplorer extends Component {
20602062
helpText="If the progress bar freezes while transferring the files, restart the app and reconnect the device. This is a known Android MTP bug."
20612063
>
20622064
<div className={styles.socialMediaShareContainer}>
2063-
<Typography className={styles.donationBtnsTitle}>
2065+
<Typography className={styles.supportBtnsTitle}>
20642066
{`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}>
20662068
{`I hate to run ads.`}&nbsp;Help me keep {APP_NAME}
20672069
&nbsp;
2068-
<span className={styles.donationBtnsBoldText}>Free</span>
2070+
<span className={styles.supportBtnsBoldText}>Free</span>
20692071
&nbsp;and&nbsp;
2070-
<span className={styles.donationBtnsBoldText}>Open</span>,
2071-
forever!
2072+
<span className={styles.supportBtnsBoldText}>Open</span>!
20722073
</span>
20732074
</Typography>
2074-
<div className={styles.socialMediaShareBtnsContainer}>
2075-
{donationBtnsList.map((a, index) => (
2075+
<div className={styles.supportBtnsContainer}>
2076+
{supportBtnsList.map((a, index) => (
20762077
// eslint-disable-next-line react/no-array-index-key
20772078
<Tooltip key={index} title={a.label}>
20782079
<div>
2079-
<IconButton
2080+
<div
20802081
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,
20852093
})}
20862094
>
20872095
{a.image && (
20882096
<img
20892097
alt={a.label}
20902098
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+
})}
21002102
/>
21012103
)}
2102-
</IconButton>
2104+
</div>
21032105
</div>
21042106
</Tooltip>
21052107
))}

app/containers/HomePage/styles/FileExplorer.js

+29-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ export const styles = (theme) => ({
22
socialMediaShareContainer: {
33
paddingTop: 5,
44
},
5-
donationBtnsTitle: {
5+
supportBtnsTitle: {
66
marginBottom: 10,
77
fontSize: 12,
88
fontWeight: 500,
99
},
10-
donationBtnsTitleNewLine: {
10+
supportBtnsTitleNewLine: {
1111
display: 'block',
1212
},
13-
donationBtnsBoldText: {
13+
supportBtnsBoldText: {
1414
fontWeight: 'bold',
1515
},
1616
socialMediaShareTitle: {
@@ -50,4 +50,30 @@ export const styles = (theme) => ({
5050
background: `rgba(255, 255, 255, 0.85) !important`,
5151
},
5252
},
53+
54+
supportBtnsContainer: {
55+
width: `100%`,
56+
display: `flex`,
57+
},
58+
supportBtnWrapper: {
59+
width: 'auto',
60+
},
61+
supportBtnWrapperForImage: {
62+
padding: `0px 10px 5px 0 !important`,
63+
},
64+
supportBtnImages: {
65+
width: `100%`,
66+
height: 40,
67+
cursor: 'pointer',
68+
69+
[`&:hover`]: {
70+
filter: `brightness(0.85)`,
71+
},
72+
73+
[`&.paypal`]: {
74+
background: `#fff`,
75+
borderRadius: 7,
76+
padding: 7,
77+
},
78+
},
5379
});

app/enums/events.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export const EVENT_TYPE = {
88
BUY_ME_A_COFFEE: 'BUY_ME_A_COFFEE',
99
SUPPORT_USING_PAYPAL: 'SUPPORT_USING_PAYPAL',
1010

11+
SUPPORT_CTAS_DURING_TRANSFERRING: 'SUPPORT_CTAS_DURING_TRANSFERRING',
12+
1113
// toolbar
1214
TOOLBAR_SETTINGS_DIALOG_OPEN: 'TOOLBAR_SETTINGS_DIALOG_OPEN',
1315
TOOLBAR_SETTINGS_DIALOG_CLOSE: 'TOOLBAR_SETTINGS_DIALOG_CLOSE',
Loading
21.7 KB
Loading

0 commit comments

Comments
 (0)