Skip to content

Commit

Permalink
Merge pull request #112 from ZeusLN/master
Browse files Browse the repository at this point in the history
v0.1.0
  • Loading branch information
ZeusLN authored Jun 17, 2019
2 parents 91e3a32 + 73a92e7 commit d79aaa5
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 36 deletions.
3 changes: 1 addition & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# These are supported funding model platforms

github: kaloudis
bitcoin: https://blockstream.info/address/3Lbz4vdt15Fsa4wVD3Yk8uGf6ugKKY4zSc
bitcoin: 3Lbz4vdt15Fsa4wVD3Yk8uGf6ugKKY4zSc
2 changes: 1 addition & 1 deletion ios/zeus/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<string>3</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zeus",
"version": "0.1.0-beta2",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
Expand All @@ -20,7 +20,7 @@
"object-hash": "1.3.1",
"react": "16.6.3",
"react-native": "0.59.8",
"react-native-camera-kit": "7.3.4",
"react-native-camera-kit": "7.3.7",
"react-native-data-table": "0.2.1",
"react-native-elements": "1.1.0",
"react-native-gesture-handler": "1.0.15",
Expand Down
13 changes: 5 additions & 8 deletions patches/rnck-build.gradle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@
}

dependencies {
- compile 'com.facebook.react:react-native:+'
- compile 'com.android.support:recyclerview-v7:25.0.1'
- compile 'com.google.zxing:core:3.3.0'
- compile group: 'com.drewnoakes', name: 'metadata-extractor', version: '2.9.1'
-}
- implementation 'com.facebook.react:react-native:+'
+ implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
+ implementation 'com.android.support:recyclerview-v7:25.0.1'
+ implementation 'com.google.zxing:core:3.3.0'
+ implementation group: 'com.drewnoakes', name: 'metadata-extractor', version: '2.9.1'
implementation 'com.android.support:recyclerview-v7:25.0.1'
implementation 'com.google.zxing:core:3.3.0'
implementation group: 'com.drewnoakes', name: 'metadata-extractor', version: '2.9.1'
-}
+}
\ No newline at end of file
9 changes: 0 additions & 9 deletions views/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,6 @@ export default class Settings extends React.Component<SettingsProps, SettingsSta
backgroundColor={savedTheme === 'dark' ? '#261339' : 'rgba(92, 99,216, 1)'}
/>

{loading && <Button
title=""
loading
buttonStyle={{
backgroundColor: 'transparent'
}}
onPress={() => void(0)}
/>}

{passphraseError && <Text style={{ color: 'red', textAlign: 'center', padding: 20 }}>Passphrases do not match</Text>}

<View style={styles.form}>
Expand Down
28 changes: 18 additions & 10 deletions views/Settings/AddEditNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface AddEditNodeState {
saved: boolean;
active: boolean;
index: number;
newEntry: boolean;
}

@inject('SettingsStore')
Expand All @@ -30,7 +31,8 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd
macaroonHex: '',
saved: false,
index: 0,
active: false
active: false,
newEntry: false
}

async componentDidMount() {
Expand All @@ -42,6 +44,7 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd
const index = navigation.getParam('index', null);
const active = navigation.getParam('active', null);
const saved = navigation.getParam('saved', null);
const newEntry = navigation.getParam('newEntry', null);

if (node) {
const { host, port, macaroonHex } = node;
Expand All @@ -52,12 +55,14 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd
macaroonHex,
index,
active,
saved
saved,
newEntry
});
} else {
this.setState({
index,
active
active,
newEntry
});
}
}
Expand All @@ -71,6 +76,7 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd
const node = navigation.getParam('node', null);
const index = navigation.getParam('index', null);
const active = navigation.getParam('active', null);
const newEntry = navigation.getParam('newEntry', null);

if (node) {
const { host, port, macaroonHex } = node;
Expand All @@ -80,21 +86,23 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd
port,
macaroonHex,
index,
active: index === this.props.SettingsStore.settings.selectedNode
active: index === this.props.SettingsStore.settings.selectedNode,
newEntry
});
} else {
this.setState({
index,
active
active,
newEntry
});
}

}

saveNodeConfiguration = () => {
const { SettingsStore } = this.props;
const { SettingsStore, navigation } = this.props;
const { host, port, macaroonHex, index } = this.state;
const { getSettings, setSettings, settings } = SettingsStore;
const { setSettings, settings } = SettingsStore;

const node = {
host,
Expand All @@ -117,7 +125,7 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd
saved: true
});

getSettings();
navigation.navigate('Settings', { refresh: true });
}

deleteNodeConfig = () => {
Expand Down Expand Up @@ -165,7 +173,7 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd

render() {
const { navigation, SettingsStore } = this.props;
const { host, port, macaroonHex, saved, active, index } = this.state;
const { host, port, macaroonHex, saved, active, index, newEntry } = this.state;
const { loading, settings } = SettingsStore;
const savedTheme = settings.theme;

Expand Down Expand Up @@ -241,7 +249,7 @@ export default class AddEditNode extends React.Component<AddEditNodeProps, AddEd
/>
</View>

{saved && <View style={styles.button}>
{saved && !newEntry && <View style={styles.button}>
<Button
title={active ? "Node Active" : "Set Node Config as Active"}
icon={{
Expand Down
3 changes: 2 additions & 1 deletion views/Settings/Nodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class Nodes extends React.Component<NodesProps, {}> {
onPress={() => navigation.navigate('AddEditNode', { node: item, index: index, active: selectedNode === index, saved: true })}
titleStyle={{ color: theme === 'dark' ? 'white' : 'black' }}
subtitleStyle={{ color: theme === 'dark' ? 'gray' : '#8a8999' }}
refreshing={loading}
/>
</React.Fragment>
);
Expand Down Expand Up @@ -88,7 +89,7 @@ export default class Nodes extends React.Component<NodesProps, {}> {
marginBottom: 20,
backgroundColor: 'crimson'
}}
onPress={() => navigation.navigate('AddEditNode', { index: nodes && nodes.length && Number(nodes.length) || 0 })}
onPress={() => navigation.navigate('AddEditNode', { newEntry: true, index: nodes && nodes.length && Number(nodes.length) || 0 })}
titleStyle={{
color: 'white'
}}
Expand Down

0 comments on commit d79aaa5

Please sign in to comment.