Skip to content

Commit

Permalink
Merge pull request #93 from ganeshrvel/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ganeshrvel authored Nov 15, 2019
2 parents 8195d53 + 01972b5 commit 35d7354
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 28 deletions.
59 changes: 32 additions & 27 deletions app/containers/HomePage/components/FileExplorer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint no-case-declarations: off */

import React, { Component, Fragment } from 'react';
import Typography from '@material-ui/core/Typography';
import { withStyles } from '@material-ui/core/styles';
import { remote, ipcRenderer, shell } from 'electron';
import lodashSortBy from 'lodash/sortBy';
Expand Down Expand Up @@ -90,35 +91,35 @@ let multipleSelectDirection = null;
const socialMediaShareBtnsList = [
{
enabled: true,
label: 'GitHub',
label: 'Find us on GitHub',
imgSrc: 'SocialMediaShare/github.svg',
url: APP_GITHUB_URL,
invert: false
},
{
enabled: true,
label: 'Share on tweet',
label: 'Share it on Twitter',
imgSrc: 'SocialMediaShare/twitter.svg',
url: twitterShareUrl,
invert: false
},
{
enabled: true,
label: 'Share on Facebook',
label: 'Share it on Facebook',
imgSrc: 'SocialMediaShare/facebook.svg',
url: fbShareUrl,
invert: false
},
{
enabled: true,
label: 'Share on Reddit',
label: 'Share it on Reddit',
imgSrc: 'SocialMediaShare/reddit.svg',
url: redditShareUrl,
invert: false
},
{
enabled: true,
label: 'Buy me a coffee',
label: 'Buy me a Coffee',
imgSrc: 'SocialMediaShare/paypal.svg',
url: DONATE_PAYPAL_URL,
invert: false
Expand Down Expand Up @@ -1483,10 +1484,10 @@ class FileExplorer extends Component {
<ProgressBarDialog
titleText="Transferring files..."
bodyText1={`${
fileTransferProgess.bodyText1 ? fileTransferProgess.bodyText1 : null
fileTransferProgess.bodyText1 ? fileTransferProgess.bodyText1 : ''
}`}
bodyText2={`${
fileTransferProgess.bodyText2 ? fileTransferProgess.bodyText2 : null
fileTransferProgess.bodyText2 ? fileTransferProgess.bodyText2 : ''
}`}
trigger={togglePasteDialog}
fullWidthDialog
Expand All @@ -1495,26 +1496,30 @@ class FileExplorer extends Component {
helpText="If the progress bar freezes while transferring the files, restart the app and reconnect the device. This is a known Android MTP bug."
progressValue={fileTransferProgess.percentage}
>
<div className={styles.socialMediaShareBtnsWrapper}>
{socialMediaShareBtnsList.map((a, index) => (
// eslint-disable-next-line react/no-array-index-key
<Tooltip key={index} title={a.label}>
<div>
<IconButton
aria-label={a.label}
disabled={!a.enabled}
onClick={() => openExternalUrl(a.url)}
>
<img
className={styles.socialMediaShareBtn}
src={imgsrc(a.imgSrc)}
title={a.label}
alt={a.label}
/>
</IconButton>
</div>
</Tooltip>
))}
<div className={styles.socialMediaShareContainer}>
<Typography className={styles.socialMediaShareTitle}>
Liked using the App?
</Typography>
<div className={styles.socialMediaShareBtnsWrapper}>
{socialMediaShareBtnsList.map((a, index) => (
// eslint-disable-next-line react/no-array-index-key
<Tooltip key={index} title={a.label}>
<div>
<IconButton
aria-label={a.label}
disabled={!a.enabled}
onClick={() => openExternalUrl(a.url)}
>
<img
className={styles.socialMediaShareBtn}
src={imgsrc(a.imgSrc)}
alt={a.label}
/>
</IconButton>
</div>
</Tooltip>
))}
</div>
</div>
</ProgressBarDialog>

Expand Down
8 changes: 8 additions & 0 deletions app/containers/HomePage/styles/FileExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
import { variables, mixins } from '../../../styles/js';

export const styles = theme => ({
socialMediaShareContainer: {
paddingTop: 5
},
socialMediaShareTitle: {
fontSize: 11,
fontWeight: 500,
color: `rgba(0, 0, 0, 0.7)`
},
socialMediaShareBtnsWrapper: {
width: '100%',
display: 'flex'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openmtp",
"productName": "OpenMTP",
"version": "2.3.2",
"version": "2.3.3",
"description": "OpenMTP | Android File Transfer for macOS",
"scripts": {
"build": "yarn lint && concurrently \"yarn build-main\" \"yarn build-renderer\"",
Expand Down

0 comments on commit 35d7354

Please sign in to comment.