Skip to content

Commit

Permalink
New design (novasamatech#110)
Browse files Browse the repository at this point in the history
* new design init

* move App.js into the root of src

* the screens dir

* New UI Header impl

* TabBar initial

* Button component

* small fix

* AccountCard component impl

* AccountDetailsCard impl

* Identicon chooser impl

* AccountNew name TextImput impl

* add account store impl

* navigate to account list on new account

* account list and account new are working

* Scanner Store and new screens

* TxDetails screen

* proper navigation implemented, cleanups

* Roboto fonts added, icons added

* more styling

* Background lines attempt

* Account Edit

* save edited account and autoFocus

* Account backup, AccountPin, AccountUnlock screens

* AccountsStore refactoring

* soft delete account

* createdAt updatedAt added

* Signing test

* TX details polish

* singedTX screen polish

* cleanup

* use prettier to reformat code

* fix travis

* reorganise AccountLIst

* AccountAdd Screen added

* Backup and Recover flow done

* auto-check PIN

* navigation fix

* package.json cleanup and license headers

* fix margin

* the 'GETTING STARTED' implemented

* AccountPin cleanup

* ListView (is depricated) -> FlatList

* reset new account in the AccountAdd

* fix account edit

* fix ios deployment target and recursive header expension failure

* .prettierrc introduced. printWidth set to 80

* fix input focus. KeyboardAwareScrollView added

* fix quotes

* debounce added to AccountRecover

* pin >= 6 digits

* launch image back

* pop-to-top on tap on the active tab

* fix formatting

* Background lines impl

* twick bg lines color

* tx store implemented

* initial Android build

* INTERNET permission is required for debug build

* ScrollView for AccountAdd

* account PIN form tune

* Manifold CF font added

* accounts networkId and networkType  added

* update .prettierrc

* Secure right header indicator impl

* move out HeaderLeftHome to a separate file

* Ability to specify chain(s) per account so that users understand the app can be used with any Ethreum-like network implemented

* fix 'App crash in release mode when using 'View.propTypes.style' and release build

* SecurityStore added, SecurityHeader fixed

* Security screen impl

* tune the back button font

* tune up the SignedTx screen

* DRY AccountCard

* debounce added to AccountUnlock

* Change Pin added, Lock selected account on AccountBackup unmount

* turn off Camera if not in use

* update react-native-secure-storage dep

* fix account backup message formatting

* fix Andriod-specific issue (facebook/react-native#13243)

* fix AccountRecover

* QrView auto-scale

* Use TouchableItem  in AccountCard and AccountDetailsCard

* fix AccountEdit in Andriod

* SignedTx fix for Android

* try to unlock only if pin.length > = 6

* scroll to index

* scroll to account in account list after creating a new account tested

* new QrScreen layout

* Scanner screen done

* Fix Andriod inputs

* Android release fixes

* SecurityStore fixes

* disable cardStyle

* make keyboard dark

* small refactoring

* pop to top in the list attempt

* fix scrollToIndex

* Scroll to the first item in accounts on tap on the Accounts tab

* refactor AccountIcon

* Use React.PureComponent to improve performance

* use more React.PureComponent

* Change title of Backup button

* fix msgs novasamatech#117

* Secured -> Secure

* storage migration added

* iOS app version 1.0 -> 2.0

* seed wordlist added

* add a flag which means that account was recovered from the prev. DB version

* fix "try again" in case of transaction parsing failure

* bump iOS version

* fix a small TabBattombuttons bug

* tweak font sizes

* bump iOS version

* empty acc fix

* move brainWalletAddress genaration in AccountStore

* Copy seed on AccountBackup

* Suggestions from the WORDLIST added on AccountRecovery screen

* Animation added

* tune animation

* show suggestions on TextInput focus

* fonts ajustment

* bump iOS version

* do not remove anything

* font size ajustment, keyboardShouldPersistTaps in AccountNew

* fix icon chooser

* bump iOS version

* use ERC-681 for address QR

* Lock account of app goes background on the BACKUP ACCOUNT screen

* bump iOS version
  • Loading branch information
lexfrl authored and debris committed Aug 6, 2018
1 parent eecd858 commit 8b4e357
Show file tree
Hide file tree
Showing 145 changed files with 6,414 additions and 3,795 deletions.
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 80,
"parser": "flow",
"singleQuote": true
}
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ cache:
- node_modules

install:
- npm i
- yarn

script:
- npm run lint
- npm run test
- yarn run test
9 changes: 9 additions & 0 deletions ReactotronConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Reactotron from "reactotron-react-native";

if (__DEV__) {
Reactotron.configure({
host: "192.168.1.63"
}) // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.connect(); // let's connect!
}
16 changes: 16 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ android {
abiFilters "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
splits {
abi {
reset()
Expand Down Expand Up @@ -136,6 +151,7 @@ android {
}

dependencies {
compile project(':react-native-vector-icons')
compile project(':react-native-secure-storage')
compile project(':react-native-camera')
compile fileTree(dir: "libs", include: ["*.jar"])
Expand Down
6 changes: 4 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nativesigner">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:allowBackup="true"
android:testOnly="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
Binary file added android/app/src/main/assets/fonts/Entypo.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/EvilIcons.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Feather.ttf
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Foundation.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Ionicons.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Manifold-CF.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Octicons.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Zocial.ttf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ public void decryptData(String data, String password, Promise promise) {
private static native String ethkeyRandomPhrase(int words);
private static native String ethkeyEncryptData(String data, String password);
private static native String ethkeyDecryptData(String data, String password);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
*/

public class EthkeyBridgePackage implements ReactPackage {
@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import com.reactlibrary.RNSecureStoragePackage;
import com.lwansbrough.RCTCamera.RCTCameraPackage;
import org.reactnative.camera.RNCameraPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand All @@ -25,8 +26,10 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage(),
new RNSecureStoragePackage(),
new RCTCameraPackage()
new RNCameraPackage(),
new EthkeyBridgePackage()
);
}

Expand Down
7 changes: 7 additions & 0 deletions android/app/src/main/jniLibs/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libsigner
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libsigner.so
include $(PREBUILT_SHARED_LIBRARY)
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
# org.gradle.parallel=true

android.useDeprecatedNdk=true
android.enableAapt2=false
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'NativeSigner'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-secure-storage'
project(':react-native-secure-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secure-storage/android')
include ':react-native-camera'
Expand Down
2 changes: 1 addition & 1 deletion index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

import { AppRegistry, YellowBox } from 'react-native'
import App from './src/components/App'
import App from './src/App'
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader'])

AppRegistry.registerComponent('NativeSigner', () => App)
2 changes: 1 addition & 1 deletion index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

import { AppRegistry, YellowBox } from 'react-native'
import App from './src/components/App'
import App from './src/App'
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader'])

AppRegistry.registerComponent('NativeSigner', () => App)
21 changes: 9 additions & 12 deletions src/reducers/index.js → index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

'use strict'
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/

import { combineReducers } from 'redux'
import accounts from './accounts'
import routes from './routes'
import scanner from './scanner'
import signer from './signer'
import { AppRegistry, YellowBox } from 'react-native'
import App from './src/App'
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader'])

export default combineReducers({
accounts,
routes,
scanner,
signer
})
AppRegistry.registerComponent('NativeSigner', () => App)
Loading

0 comments on commit 8b4e357

Please sign in to comment.