Skip to content

Commit

Permalink
Merge pull request #145 from ZeusLN/master
Browse files Browse the repository at this point in the history
v0.1.1
  • Loading branch information
ZeusLN authored Oct 19, 2019
2 parents d79aaa5 + a73dbba commit 3d6cb60
Show file tree
Hide file tree
Showing 78 changed files with 7,705 additions and 2,697 deletions.
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"tabWidth": 4,
"semi": true,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false
}
2 changes: 1 addition & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ const styles = StyleSheet.create({
container: {
flex: 1
}
});
});
46 changes: 25 additions & 21 deletions Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const AppScenes = {
Wallet: {
screen: Wallet
},
AddressQRCodeScanner : {
AddressQRCodeScanner: {
screen: AddressQRScanner
},
NodeQRCodeScanner : {
NodeQRCodeScanner: {
screen: NodeQRScanner
},
Settings: {
Expand Down Expand Up @@ -81,12 +81,12 @@ const AppScenes = {
NodeInfo: {
screen: NodeInfo
}
}
};

const PopUpTransition = (index: number, position: any) => {
const opacity = position.interpolate({
inputRange: [index - 1, index, index + 0.999, index + 1],
outputRange: [ 0, 1, 1, 0]
outputRange: [0, 1, 1, 0]
});

const translateY = position.interpolate({
Expand All @@ -95,33 +95,32 @@ const PopUpTransition = (index: number, position: any) => {
});

return {
opacity,
transform: [
{translateY}
]
}
opacity,
transform: [{ translateY }]
};
};

const SlideFromRightTransition = (index: number, position: any, layout: any) => {
const SlideFromRightTransition = (
index: number,
position: any,
layout: any
) => {
const opacity = position.interpolate({
inputRange: [index - 1, index, index + 0.999, index + 1],
outputRange: [ 0, 1, 1, 0]
outputRange: [0, 1, 1, 0]
});

const width = layout.initWidth
const width = layout.initWidth;

const translateX = position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [width, 0, 0]
})

});

return {
opacity,
transform: [
{translateX}
]
}
opacity,
transform: [{ translateX }]
};
};

const TransitionConfiguration = () => {
Expand All @@ -132,13 +131,18 @@ const TransitionConfiguration = () => {
const { index } = scene;

const routeName = scene.route.routeName;
if (routeName === 'Transaction' || routeName === 'Channel' || routeName === 'Invoice' || routeName === 'Payment') {
if (
routeName === 'Transaction' ||
routeName === 'Channel' ||
routeName === 'Invoice' ||
routeName === 'Payment'
) {
return SlideFromRightTransition(index, position, layout);
}

return PopUpTransition(index, position);
}
}
};
};

const AppNavigator = createStackNavigator(AppScenes, {
Expand Down
52 changes: 52 additions & 0 deletions PGP.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBFuPOsoBEADX3fi2qY/AH68tiOLMXvLkK1hdhgDlcv8Od6gYllpnJCNMYkXC
9s3uRyWxL93a89qRpoKLkFpTJpnMiY5Zxcn4jwlxuNFiGoBJ+I+l3LJrtvIvMntF
e6ETpCXCKOQtseoVSOhEl5jUSYOa5MiiaftZTFT9Cg7+Euu7XlwVOdDG26UMmyYt
JpviRQYVSaHNZYDopRloJE0TNlFTdjw7DzHgn9ZN4S+DbrrDqIBYNtNzdavMUiEB
dFO7uLzXzcyFHbvq3SeKRps8p0uwwjWuGu+GvEPO4JEjDSEi+rKf8JJ5bdgvpEAI
sroBjBeGUXgWvNrS9SP9A9Gx4fWqP0GNeO07Q/TLdI8ZQvg+s0czZeLM95dLUOBW
ZbKtqZji5sjxo1z6gABZvcfQaPpqWMNri7g+avKjvjMCQNjevz7Ke8tRHJtTwh8K
awKsaFOGMbto5RZ4+Ncef0aocSUBDdUpCjoSj9P5gq74dY/ZbW68ZZunsG0ZWRHY
YPBUW3QsKPkCTqq6B8fj7MSvDC+2LPsTB3BU4ApqL64yWNCXZMKhgBSE/1NCkTmd
EVLQbotdtBq4pUW9X4aez7E7zjvW6zqZJgSiDhnybLKt5y+0q+rHe6kF/BEWUA/e
OKua1vg6VZ9NRbN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0nZspWRR65AHPCftTzvY37BOAK1bCUluUTwVPT01jQUu/8Mg
QTDXxAjV1ArFkVrfR6IMqBn4jPVziCeTtSyTrTJxpayB9aM2yG5N/PC0udtq6IOR
zUMjWNCPBQmQ4y96oZEHWmtoTg5+/XiwqsmzjSJlegdmWLDTuWV/UiTaBaElC8Rp
dJNdiejz9z9v8hVTibi4PmMqs27QQestzT+OQf2DFHOPRzzhbi4GoIcQsICpKLi2
CK1BqhhFNg0=
=L+5q
-----END PGP PUBLIC KEY BLOCK-----
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Zeus is built on TypeScript and React-Native. It runs on both iOS and Android.
* Keep up with us on
[Twitter](https://twitter.com/ZeusLN)
* Open a channel with
[our node](https://1ml.com/node/03b053229a315d4071520d7466f50b91be0edad375122c15932ba3334539a72a6c)
[our node](https://1ml.com/node/03e1210c8d4b236a53191bb172701d76ec06dfa869a1afffcfd8f4e07d9129d898)

## Connecting to your node

Expand Down
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ android {
applicationId "com.zeusln.zeus"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 10
versionName "0.1.0"
versionCode 11
versionName "0.1.1"
}
signingConfigs {
release {
Expand Down Expand Up @@ -150,6 +150,7 @@ dependencies {
implementation project(':rncamerakit')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-vector-icons')
implementation project(':react-native-activity-result-fork')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
Expand Down
4 changes: 3 additions & 1 deletion android/app/src/main/java/com/zeus/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import com.zeusln.zeus.extensions.CustomClientFactory;
import com.microsoft.ActivityResultPackage;

import java.util.Arrays;
import java.util.List;
Expand All @@ -34,7 +35,8 @@ protected List<ReactPackage> getPackages() {
new KeychainPackage(),
new RNCameraKitPackage(),
new RNGestureHandlerPackage(),
new VectorIconsPackage()
new VectorIconsPackage(),
new ActivityResultPackage()
);
}

Expand Down
12 changes: 12 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ wrapper {
gradleVersion = '4.7'
distributionUrl = distributionUrl.replace("bin", "all")
}

subprojects {
afterEvaluate {
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion = 28
buildToolsVersion = "28.0.3"
}
}
}
}
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
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-activity-result-fork'
project(':react-native-activity-result-fork').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-activity-result-fork/android')

include ':app'
16 changes: 11 additions & 5 deletions components/BalanceSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,26 @@ interface BalanceSliderProps {
theme?: string;
}

export default class BalanceSlider extends React.Component<BalanceSliderProps, {}> {
export default class BalanceSlider extends React.Component<
BalanceSliderProps,
{}
> {
render() {
const { localBalance, remoteBalance, list, theme } = this.props;

const totalBalance = Number(localBalance || 0) + Number(remoteBalance || 0);
const totalBalance =
Number(localBalance || 0) + Number(remoteBalance || 0);

const ratio = Number(localBalance) / Number(totalBalance) || 0;

return (
<View style={list ? styles.sliderList : styles.slider}>
<Slider
value={ratio}
maximumTrackTintColor={"orange"}
minimumTrackTintColor={theme === "dark" ? "#2b74b4" : "rgba(92, 99,216, 1)"}
maximumTrackTintColor={'orange'}
minimumTrackTintColor={
theme === 'dark' ? '#2b74b4' : 'rgba(92, 99,216, 1)'
}
trackStyle={styles.trackStyle}
thumbStyle={styles.thumbStyle}
/>
Expand Down Expand Up @@ -50,4 +56,4 @@ const styles = StyleSheet.create({
width: 0,
height: 0
}
});
});
44 changes: 23 additions & 21 deletions components/CollapsedQR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,55 @@ interface CollapsedQRState {
collapsed: boolean;
}

export default class CollapsedQR extends React.Component<CollapsedQRProps, CollapsedQRState> {
export default class CollapsedQR extends React.Component<
CollapsedQRProps,
CollapsedQRState
> {
state = {
collapsed: true
}
};

toggleCollapse = () => {
this.setState({
collapsed: !this.state.collapsed
});
}
};

render() {
const { collapsed } = this.state;
const { theme, value, copyText } = this.props;

return (
<React.Fragment>
<Text style={theme === 'dark' ? styles.valueDark : styles.value}>{value}</Text>
{!collapsed && <View style={styles.qrPadding}>
<QRCode
value={value}
size={200}
fgColor='white'
/>
</View>}
<Text
style={theme === 'dark' ? styles.valueDark : styles.value}
>
{value}
</Text>
{!collapsed && (
<View style={styles.qrPadding}>
<QRCode value={value} size={200} fgColor="white" />
</View>
)}
<Button
title={collapsed ? "Show QR" : "Hide QR"}
title={collapsed ? 'Show QR' : 'Hide QR'}
icon={{
name: "qrcode",
type: "font-awesome",
name: 'qrcode',
type: 'font-awesome',
size: 25,
color: '#fff'
}}
buttonStyle={{
backgroundColor: "grey",
borderRadius: 30,
backgroundColor: 'grey',
borderRadius: 30
}}
containerStyle={{
paddingTop: collapsed ? 10 : 0,
paddingBottom: 10
}}
onPress={() => this.toggleCollapse()}
/>
<CopyButton
copyValue={value}
title={copyText || "Copy"}
/>
<CopyButton copyValue={value} title={copyText || 'Copy'} />
</React.Fragment>
);
}
Expand All @@ -83,4 +85,4 @@ const styles = StyleSheet.create({
paddingTop: 25,
marginBottom: 10
}
});
});
Loading

0 comments on commit 3d6cb60

Please sign in to comment.