Skip to content

Commit

Permalink
Merge pull request #148 from ganeshrvel/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ganeshrvel authored Jun 15, 2020
2 parents 5d93d73 + 5677575 commit f4d896a
Show file tree
Hide file tree
Showing 25 changed files with 12,985 additions and 303 deletions.
39 changes: 23 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,29 @@ module.exports = {
plugins: ['import', 'promise', 'compat', 'react'],
extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],
settings: {
react: {
version: '16.7'
},
'import/resolver': {
webpack: {
config: 'webpack/config.eslint.js'
}
}
},
rules: {
'arrow-body-style': 'off',
'arrow-parens': 'off',
'class-methods-use-this': 'off',
'compat/compat': 'error',
'consistent-return': 'off',
'comma-dangle': 'off',
'generator-star-spacing': 'off',
'import/no-cycle': 'off',
'import/no-unresolved': 'error',
'import/no-dynamic-require': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/no-unresolved': 'error',
'import/prefer-default-export': 'off',
'jsx-a11y/control-has-associated-label': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/label-has-associated-control': 'off',
Expand All @@ -39,6 +47,16 @@ module.exports = {
],
'no-use-before-define': 'off',
'no-multi-assign': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off',
'no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^(theme|props|state|ownProps|dispatch|getState)|_',
varsIgnorePattern: '^(variables|mixins|args|log)'
}
],
'prettier/prettier': ['error', { singleQuote: true }],
'promise/param-names': 'error',
'promise/always-return': 'error',
Expand All @@ -56,24 +74,13 @@ module.exports = {
]
}
],
'react/jsx-no-bind': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }],
'react/jsx-fragments': 'off',
'react/jsx-no-bind': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prefer-stateless-function': 'off',
strict: 'off',
'import/prefer-default-export': 'off',
'arrow-body-style': 'off',
'no-underscore-dangle': 'off',
'class-methods-use-this': 'off',
'no-shadow': 'off',
'react/prop-types': 'off',
'import/no-dynamic-require': 'off',
'no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^(theme|props|state|ownProps|dispatch|getState)|_',
varsIgnorePattern: '^(variables|mixins|args|log)'
}
]
'react/no-deprecate': 'off'
}
};
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [ master, development ]
pull_request:
branches: [ master, development ]

jobs:
build:
runs-on: macOS-10.15
steps:
- name: Setup build environment
uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: npm install -g cross-env create-dmg
- name: Cloning Git repository
uses: actions/checkout@v1
- name: Attempt to build OpenMTP
run: |
yarn
yarn build
- name: Attempt to generate unsigned macOS app
run: |
export CSC_IDENTITY_AUTO_DISCOVERY=false
yarn package-mac 2>&1 || true
- name: Check if macOS app was generated
run: test -e dist/mac/OpenMTP.app
- name: Attempt to create disk image for generated macOS app
run: |
mkdir dist/dmg
create-dmg dist/mac/OpenMTP.app dist/dmg 2>&1 || true
shasum dist/dmg/* >> dist/dmg/CHECKSUM_SHA256.txt
- name: Upload disk image and checksum as artifact
uses: actions/upload-artifact@v1.0.0
with:
name: 'Disk Image'
path: dist/dmg/
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ main.js.map

.idea
npm-debug.log.*
yarn.lock
package-lock.json
.env*

Expand Down
136 changes: 48 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,30 @@

- Author: [Ganesh Rathinavel](https://www.linkedin.com/in/ganeshrvel "Ganesh Rathinavel")
- License: [MIT](https://github.com/ganeshrvel/openmtp/blob/master/LICENSE "MIT")
- System Requirements: macOS v10.10 or higher
- System Requirements: macOS 10.10 or higher
- Website URL: [https://ganeshrvel.github.io/openmtp](https://ganeshrvel.github.io/openmtp/ "https://ganeshrvel.github.io/openmtp")
- Repo URL: [https://github.com/ganeshrvel/openmtp](https://github.com/ganeshrvel/openmtp/ "https://github.com/ganeshrvel/openmtp")
- Contacts: ganeshrvel@outlook.com


### Introduction
## Introduction

##### Advanced Android File Transfer Application for macOS.
### Advanced Android File Transfer Application for macOS.

Transferring files between macOS and Android or any other MTP devices has always been a nightmare. There are a few File Transfer MTP apps which are available online but most of them are either too expensive or come with bad UI/UX. The official "Android File Transfer" app for macOS from Google comes with bugs, innumerable limitations, some of which include - not being able to transfer files larger than 4GB, frequent disconnections, unable to rename the folders or files on the android/MTP devices. Most of the other apps available online uses either WiFi or ADB protocol to transfer the files, which is an extremely time-consuming process.

Countless searches to find an app to solve these problems and failing to find one made me restless. So, I took the leap and decided to create an app for us that could help us have a smooth and hassle-free file transfer process from macOS to Android/MTP devices. Created with the objective of giving back to the community, we can all use this app for free in this lifetime.

### Features
- Plug and Play. No hassles, easy and instant connection.
- Connect via USB cable - Highest data transfer rates.
- Transfer multiple files which are larger than 4GB in one go.
- Select between Internal Memory and SD Card.
- Split pane views for both Local Computer and Android device.
- Drag 'n Drop your files.
- Safe, Transparent and Open-Source
- Plug and Play via USB. No hassles, easy and instant connection.
- Select between Internal Memory and SD Card
- Transfer multiple files which are larger than 4GB
- Drag-and-drop support
- Split pane views for both Local Computer and Android device
- Choose between Grid and List view.
- Use Keyboard Shortcuts to navigate through your files.
- Safe, Transparent and Open-Source.
- We don't collect any personally identifiable information.
- It's FREE and shall ALWAYS remain FREE!!
- No collection of personally identifiable information.


### Installation
Expand All @@ -45,65 +43,28 @@ Countless searches to find an app to solve these problems and failing to find on
![OpenMTP File Transfer](https://github.com/ganeshrvel/openmtp/raw/master/blobs/images/file-transfer-bluebg.png "OpenMTP File Transfer")

### Keyboard Shortcuts
New Folder
<kbd>command</kbd>+<kbd>n</kbd>

Copy
<kbd>command</kbd>+<kbd>c</kbd>

Copy to Queue
<kbd>command</kbd>+<kbd>shift</kbd>+<kbd>c</kbd>

Paste
<kbd>command</kbd>+<kbd>v</kbd>

Delete
<kbd>backspace</kbd>

Refresh
<kbd>command</kbd>+<kbd>r</kbd>

Folder Up
<kbd>command</kbd>+<kbd>b</kbd>

Select All
<kbd>command</kbd>+<kbd>a</kbd>

Rename
<kbd>command</kbd>+<kbd>d</kbd>

Open
<kbd>enter</kbd>

Switch Tab
<kbd>command</kbd>+<kbd>1</kbd>

Navigate Left
<kbd>left</kbd>

Navigate Right
<kbd>right</kbd>

Navigate Up
<kbd>up</kbd>

Navigate Down
<kbd>down</kbd>

Select Multiple Items Forward (for Grid view)
<kbd>shift</kbd>+<kbd>left</kbd>

Select Multiple Items Backward (for Grid view)
<kbd>shift</kbd>+<kbd>right</kbd>

Select Multiple Items Forward (for List view)
<kbd>shift</kbd>+<kbd>up</kbd>

Select Multiple Items Backward (for List view)
<kbd>shift</kbd>+<kbd>down</kbd>

Select Multiple Items (using mouse)
<kbd>command</kbd>+<kbd>click</kbd> or <kbd>shift</kbd>+<kbd>click</kbd>
| Command | Keyboard Shortcut |
| ------------------------------------------------- | ------------------------------------------------------------ |
| Delete | <kbd>backspace</kbd> |
| New Folder | <kbd>command (⌘)</kbd>+<kbd>n</kbd> |
| Copy | <kbd>command (⌘)</kbd>+<kbd>c</kbd> |
| Copy to Queue | <kbd>command (⌘)</kbd>+<kbd>shift</kbd>+<kbd>c</kbd> |
| Paste | <kbd>command (⌘)</kbd>+<kbd>v</kbd> |
| Refresh | <kbd>command (⌘)</kbd> +<kbd>r</kbd> |
| Folder Up | <kbd>command (⌘)</kbd>+<kbd>b</kbd> |
| Select All | <kbd>command (⌘)</kbd>+<kbd>a</kbd> |
| Rename | <kbd>command (⌘)</kbd>+<kbd>d</kbd> |
| Switch Tab | <kbd>command(⌘)</kbd>+<kbd>1</kbd> |
| Open | <kbd>enter</kbd> |
| Navigate Left | <kbd>left</kbd> |
| Navigate Right | <kbd>right</kbd> |
| Navigate Up | <kbd>up</kbd> |
| Navigate Down | <kbd>down</kbd> |
| Select Multiple Items Forward **(in Grid View)** | <kbd>shift</kbd>+<kbd>left</kbd> |
| Select Multiple Items Backward **(in Grid View)** | <kbd>shift</kbd>+<kbd>right</kbd> |
| Select Multiple Items Forward **(in List View)** | <kbd>shift</kbd>+<kbd>up</kbd> |
| Select Multiple Items Backward **(in List View)** | <kbd>shift</kbd>+<kbd>down</kbd> |
| Select Multiple Items **(with mouse)** | <kbd>command (⌘)</kbd>+<kbd>click</kbd> or <kbd>shift</kbd>+<kbd>click</kbd> |

## Building from Source

Expand Down Expand Up @@ -149,16 +110,15 @@ Setup the *code signing* to build, package and publish the app.
- Rename *sample.env* file as *.env*
- Update APPLEID in *.env* file
- Log into your [Apple Account](https://appleid.apple.com/account/manage "Apple Account")
- Goto **Security > APP-SPECIFIC PASSWORDS**
- Goto **Security > App-Specific Passwords**
- Click on **Generate Password...**, enter a password label and click *Create*
- Copy the displayed *app-specific-password*
- Run
```shell
security add-generic-password -a "<apple-developer-account-username>" -w <app-specific-password*> -s "ELECTRON_NOTORIZE_PASSWORD"
```

- Log into your [Apple App Store Connect Account](https://appstoreconnect.apple.com/agreements/# "Apple App Store Connect Account")
- Accept to all agreements
- Log into your [Apple App Store Connect Account](https://appstoreconnect.apple.com/agreements/# "Apple App Store Connect Account") and accept the presented terms and conditions
- The statuses shall turn *Active*

**Packaging**
Expand All @@ -178,13 +138,12 @@ $ yarn package-all


### Technical Features
- Built using Electron v6, React v16.8, Redux v4, Webpack v4, Babel v7 and Material UI v4.2
- Hot module Reload (HMR) for instant feedback.
- Highly modular.
- Inbuilt error logging and profile/settings management.
- Loadables, Dynamic Reducer Injection, Selectors for efficient Code. splitting and performance/startup optimisation.
- Industry standard State management.
- JSS, SASS/SCSS styling.
- Built using Electron v6, React v16.8, Redux v4, Webpack v4, Babel v7 and Material UI v4.2 and highly modular
- Loadables, dynamic reducer injection, selectors for efficient code. splitting and performance/startup optimisation
- Hot module reload (HMR) for instant feedback
- Inbuilt error logging and profile/settings management
- Industry standard state management
- JSS, SASS/SCSS styling
- Port assigned: **4642**

### Configurations
Expand All @@ -196,17 +155,17 @@ $ yarn package-all

### Debugging

\# **Debugging Guide**
#### **Debugging Guide**

[https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400 "Debugging Guide")

\# **Dispatching redux actions from the main process**
#### **Dispatching redux actions from the main process**

[https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/118](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/118 "https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/118")

[https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/108](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/108 "https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/108")

\# **VM112:2 Uncaught TypeError: Cannot read property 'state' of undefined error**
#### **VM112:2 Uncaught TypeError: Cannot read property 'state' of undefined error**

```shell
# For Mac and Linux
Expand All @@ -217,7 +176,8 @@ $ set UPGRADE_EXTENSIONS=1 && npm run dev
```

### Troubleshooting
\# **Notarizing Electron apps throws - “You must first sign the relevant contracts online. (1048)” error**
#### **Notarizing Electron apps throws - “You must first sign the relevant contracts online. (1048)” error**

[https://stackoverflow.com/questions/58358449/notarizing-electron-apps-throws-you-must-first-sign-the-relevant-contracts-on](https://stackoverflow.com/questions/58358449/notarizing-electron-apps-throws-you-must-first-sign-the-relevant-contracts-on "https://stackoverflow.com/questions/58358449/notarizing-electron-apps-throws-you-must-first-sign-the-relevant-contracts-on")

### More repos
Expand All @@ -226,7 +186,7 @@ $ set UPGRADE_EXTENSIONS=1 && npm run dev
- [Electron React Redux Advanced Boilerplate](https://github.com/ganeshrvel/electron-react-redux-advanced-boilerplate "Electron React Redux advanced boilerplate")
- [Tutorial Series by Ganesh Rathinavel](https://github.com/ganeshrvel/tutorial-series-ganesh-rathinavel "Tutorial Series by Ganesh Rathinavel")

### Accolades and Credits
### Credits

- Sincere thanks to [Vladimir Menshakov](https://github.com/whoozle "Vladimir Menshakov") for [android-file-transfer-linux](https://github.com/whoozle/android-file-transfer-linux "android-file-transfer-linux") c++ library and for all his help and support that were extended towards this project.

Expand All @@ -242,9 +202,9 @@ $ set UPGRADE_EXTENSIONS=1 && npm run dev
### Contribute
If you are interested in fixing issues and contributing directly to the code base, please see the [guidelines](https://github.com/ganeshrvel/openmtp/blob/master/CONTRIBUTING.md "guidelines").

### Buy me a coffee
### Support OpenMTP
Help me keep the app FREE and open for all.
Paypal me: [paypal.me/ganeshrvel](https://paypal.me/ganeshrvel "paypal.me/ganeshrvel")
Paypal: [paypal.me/ganeshrvel](https://paypal.me/ganeshrvel "paypal.me/ganeshrvel")

### Contacts
Please feel free to contact me at ganeshrvel@outlook.com
Expand Down
3 changes: 2 additions & 1 deletion app/api/sys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const filterJunkMtpErrors = string => {
string === '\r\n' ||
string === '' ||
string.toLowerCase().indexOf(`device::find failed`) !== -1 ||
string.toLowerCase().indexOf(`iocreateplugininterfaceforservice`) !== -1
string.toLowerCase().indexOf(`iocreateplugininterfaceforservice`) !== -1 ||
string.toLowerCase().indexOf(`Device::Find failed`) !== -1
);
};

Expand Down
6 changes: 3 additions & 3 deletions app/components/DialogBox/components/TextFieldEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle';
import TextField from '@material-ui/core/TextField';
import { styles } from '../styles/TextFieldEdit';
import { StyledTextField, styles } from '../styles/TextFieldEdit';

class TextFieldEdit extends PureComponent {
constructor(props) {
Expand Down Expand Up @@ -76,7 +75,7 @@ class TextFieldEdit extends PureComponent {
: ''}
</Typography>
</DialogContentText>
<TextField
<StyledTextField
id={id}
required={required}
label={errors.toggle ? errors.message : label}
Expand All @@ -89,6 +88,7 @@ class TextFieldEdit extends PureComponent {
onBlur={event => this._handleChange(event)}
onChange={event => this._handleChange(event)}
error={errors.toggle}
className={styles.textFieldRoot}
/>
</DialogContent>
<DialogActions>
Expand Down
Loading

0 comments on commit f4d896a

Please sign in to comment.