From 4037bad8964e365a8d032d9b6d97f18a91ca42c7 Mon Sep 17 00:00:00 2001 From: ncoelho Date: Sun, 29 Mar 2020 17:33:37 +0200 Subject: [PATCH 1/4] improve readability of list, increased white space --- BlueComponents.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/BlueComponents.js b/BlueComponents.js index 47be7f9a..4a3565d9 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -581,16 +581,17 @@ export class BlueListItem extends Component { bottomDivider containerStyle={{ backgroundColor: 'transparent', - borderBottomStartRadius: 20, - borderBottomEndRadius: 20, borderBottomColor: '#ededed', + paddingTop: 16, + paddingBottom: 16, }} titleStyle={{ color: BlueApp.settings.foregroundColor, fontSize: 16, fontWeight: '500', + marginLeft: 16, }} - subtitleStyle={{ color: BlueApp.settings.alternativeTextColor }} + subtitleStyle={{ color: BlueApp.settings.alternativeTextColor, marginLeft: 16, fontWeight: '400', width: 230 }} subtitleNumberOfLines={1} titleNumberOfLines={0} {...this.props} @@ -1025,6 +1026,12 @@ const stylesBlueIcon = StyleSheet.create({ borderRadius: 15, backgroundColor: '#f8d2d2', }, + ballOutgoingExpired: { + width: 30, + height: 30, + borderRadius: 15, + backgroundColor: '#EEF0F4', + }, ballTransparrent: { width: 30, height: 30, @@ -1109,15 +1116,8 @@ export class BlueTransactionExpiredIcon extends Component { return ( - - + + @@ -1482,7 +1482,7 @@ export const BlueTransactionListItem = ({ item, itemPriceUnit = BitcoinUnit.BTC, if (item.ispaid) { color = BlueApp.settings.successColor; } else { - color = BlueApp.settings.failedColor; + color = '#9AA0AA'; } } } else if (item.value / 100000000 < 0) { @@ -1672,7 +1672,7 @@ export class BlueListTransactionItem extends Component { if (item.ispaid) { color = '#37c0a1'; } else { - color = '#FF0000'; + color = '#9AA0AA'; } } } else if (item.value / 100000000 < 0) { From f312c4133d24290d41ae6a2427a6c3bae6107070 Mon Sep 17 00:00:00 2001 From: ncoelho Date: Sat, 28 Mar 2020 22:39:16 +0100 Subject: [PATCH 2/4] add badge --- screen/settings/electrumSettings.js | 35 +++++++++++++++++++++-------- screen/settings/settings.js | 2 +- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/screen/settings/electrumSettings.js b/screen/settings/electrumSettings.js index 8ad33fef..cf2f5105 100644 --- a/screen/settings/electrumSettings.js +++ b/screen/settings/electrumSettings.js @@ -13,6 +13,7 @@ import { BlueText, BlueButtonLink, } from '../../BlueComponents'; +import { Badge } from 'react-native-elements'; import PropTypes from 'prop-types'; let loc = require('../../loc'); let BlueElectrum = require('../../BlueElectrum'); @@ -84,6 +85,31 @@ export default class ElectrumSettings extends Component { render() { return ( + + Status + + + + {(this.state.config.status === 1 && 'Connected') || 'Not Connected'} + + + + + Currently using: + Host: {this.state.config.host} + Port: {this.state.config.port} + + + {loc.settings.electrum_settings_explain} @@ -169,15 +195,6 @@ export default class ElectrumSettings extends Component { {this.state.isLoading ? : } - - - Currently using: - Host: {this.state.config.host} - Port: {this.state.config.port} - Connected: {(this.state.config.status === 1 && 'Yes') || 'No'} - - {this.state.isLoading ? : } - ); } diff --git a/screen/settings/settings.js b/screen/settings/settings.js index 2dde4f1d..6bd42e63 100644 --- a/screen/settings/settings.js +++ b/screen/settings/settings.js @@ -46,10 +46,10 @@ const Settings = () => { navigate('DefaultView')} title="On Launch" /> )} navigate('EncryptStorage')} component={TouchableOpacity} testID="SecurityButton" /> - navigate('LightningSettings')} /> navigate('Language')} /> navigate('Currency')} /> navigate('ElectrumSettings')} /> + navigate('LightningSettings')} /> {showAdvancedOptions && ( From 59006006e23dded83e288ee916be361c227ccc33 Mon Sep 17 00:00:00 2001 From: ncoelho Date: Sun, 29 Mar 2020 13:12:03 +0200 Subject: [PATCH 3/4] Visual styling to electrum view This is missing a listenner to retrieve live changes. At the moment the user has to kill the app to see any changes. --- screen/settings/electrumSettings.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/screen/settings/electrumSettings.js b/screen/settings/electrumSettings.js index cf2f5105..5ebe9cd2 100644 --- a/screen/settings/electrumSettings.js +++ b/screen/settings/electrumSettings.js @@ -3,6 +3,7 @@ import React, { Component } from 'react'; import { View, TextInput } from 'react-native'; import { AppStorage } from '../../class'; import AsyncStorage from '@react-native-community/async-storage'; +import { ScrollView } from 'react-native-gesture-handler'; import { BlueLoading, BlueSpacing20, @@ -85,6 +86,7 @@ export default class ElectrumSettings extends Component { render() { return ( + Status @@ -98,20 +100,17 @@ export default class ElectrumSettings extends Component { }} > - + {(this.state.config.status === 1 && 'Connected') || 'Not Connected'} - Currently using: - Host: {this.state.config.host} - Port: {this.state.config.port} + {this.state.config.host}:{this.state.config.port} - - {loc.settings.electrum_settings_explain} + {loc.settings.electrum_settings_explain} {this.state.isLoading ? : } - + ); } From 8ab5edfc293ff18c7b4b68df30d815efbcf52cdf Mon Sep 17 00:00:00 2001 From: ncoelho Date: Sun, 29 Mar 2020 13:16:49 +0200 Subject: [PATCH 4/4] fix linting --- screen/settings/electrumSettings.js | 209 ++++++++++++++-------------- 1 file changed, 105 insertions(+), 104 deletions(-) diff --git a/screen/settings/electrumSettings.js b/screen/settings/electrumSettings.js index 5ebe9cd2..cb322c9a 100644 --- a/screen/settings/electrumSettings.js +++ b/screen/settings/electrumSettings.js @@ -12,7 +12,6 @@ import { BlueCard, BlueNavigationStyle, BlueText, - BlueButtonLink, } from '../../BlueComponents'; import { Badge } from 'react-native-elements'; import PropTypes from 'prop-types'; @@ -86,111 +85,113 @@ export default class ElectrumSettings extends Component { render() { return ( - - - Status - - - - {(this.state.config.status === 1 && 'Connected') || 'Not Connected'} - - + + + Status + + + + {(this.state.config.status === 1 && 'Connected') || 'Not Connected'} + + + + + + {this.state.config.host}:{this.state.config.port} + + + + + {loc.settings.electrum_settings_explain} + + + + this.setState({ host: text })} + numberOfLines={1} + style={{ flex: 1, marginHorizontal: 8, minHeight: 36, height: 36 }} + editable={!this.state.isLoading} + underlineColorAndroid="transparent" + /> + + + + this.setState({ port: text })} + numberOfLines={1} + style={{ flex: 1, marginHorizontal: 8, minHeight: 36, height: 36 }} + editable={!this.state.isLoading} + underlineColorAndroid="transparent" + /> + + + + this.setState({ sslPort: text })} + numberOfLines={1} + style={{ flex: 1, marginHorizontal: 8, minHeight: 36, height: 36 }} + editable={!this.state.isLoading} + underlineColorAndroid="transparent" + /> - - {this.state.config.host}:{this.state.config.port} - - - - {loc.settings.electrum_settings_explain} - - - - this.setState({ host: text })} - numberOfLines={1} - style={{ flex: 1, marginHorizontal: 8, minHeight: 36, height: 36 }} - editable={!this.state.isLoading} - underlineColorAndroid="transparent" - /> - - - - this.setState({ port: text })} - numberOfLines={1} - style={{ flex: 1, marginHorizontal: 8, minHeight: 36, height: 36 }} - editable={!this.state.isLoading} - underlineColorAndroid="transparent" - /> - - - - this.setState({ sslPort: text })} - numberOfLines={1} - style={{ flex: 1, marginHorizontal: 8, minHeight: 36, height: 36 }} - editable={!this.state.isLoading} - underlineColorAndroid="transparent" - /> - - - {this.state.isLoading ? : } - + + {this.state.isLoading ? : } + );