This commit is contained in:
marcosrdz 2021-01-04 20:44:28 -05:00
parent fe11a2733a
commit bb2dd89679
3 changed files with 52 additions and 33 deletions

View File

@ -20,7 +20,7 @@ const Settings = () => {
return (
<ScrollView style={styles.root}>
<StatusBar barStyle="default" />
<BlueHeaderDefaultSub leftText={loc.settings.header}/>
<BlueHeaderDefaultSub leftText={loc.settings.header} />
<BlueListItem title={loc.settings.general} onPress={() => navigate('GeneralSettings')} chevron />
<BlueListItem title={loc.settings.currency} onPress={() => navigate('Currency')} chevron />
<BlueListItem title={loc.settings.language} onPress={() => navigate('Language')} chevron />

View File

@ -11,8 +11,8 @@ import {
Image,
Dimensions,
useWindowDimensions,
SafeAreaView,
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { BlueHeaderDefaultMain, BlueTransactionListItem } from '../../BlueComponents';
import WalletsCarousel from '../../components/WalletsCarousel';
import { Icon } from 'react-native-elements';
@ -233,7 +233,7 @@ const WalletsList = () => {
const renderLocalTrader = () => {
if (carouselData.every(wallet => wallet === false)) return null;
if (carouselData.length > 0 && !carouselData.some(wallet => wallet.type === PlaceholderWallet.type)) {
return (
const button = (
<TouchableOpacity
onPress={() => {
navigate('HodlHodl', { screen: 'HodlHodl' });
@ -249,6 +249,7 @@ const WalletsList = () => {
</View>
</TouchableOpacity>
);
return isLargeScreen ? <SafeAreaView>{button}</SafeAreaView> : button;
} else {
return null;
}
@ -435,35 +436,36 @@ const WalletsList = () => {
};
return (
<SafeAreaView
style={[styles.walletsListWrapper, stylesHook.walletsListWrapper]}
onLayout={onLayout}
edges={isCatalyst ? ['right', 'top', 'left'] : ['right', 'left']}
>
<View style={styles.root} onLayout={onLayout}>
<StatusBar barStyle="default" />
<SectionList
onRefresh={refreshTransactions}
refreshing={isLoading}
renderItem={renderSectionItem}
keyExtractor={sectionListKeyExtractor}
renderSectionHeader={renderSectionHeader}
initialNumToRender={20}
contentInset={styles.scrollContent}
renderSectionFooter={renderSectionFooter}
sections={[
{ key: WalletsListSections.CAROUSEL, data: [WalletsListSections.CAROUSEL] },
{ key: WalletsListSections.LOCALTRADER, data: [WalletsListSections.LOCALTRADER] },
{ key: WalletsListSections.TRANSACTIONS, data: dataSource },
]}
/>
{renderScanButton()}
</SafeAreaView>
<View style={[styles.walletsListWrapper, stylesHook.walletsListWrapper]}>
<SectionList
onRefresh={refreshTransactions}
refreshing={isLoading}
renderItem={renderSectionItem}
keyExtractor={sectionListKeyExtractor}
renderSectionHeader={renderSectionHeader}
initialNumToRender={20}
contentInset={styles.scrollContent}
renderSectionFooter={renderSectionFooter}
sections={[
{ key: WalletsListSections.CAROUSEL, data: [WalletsListSections.CAROUSEL] },
{ key: WalletsListSections.LOCALTRADER, data: [WalletsListSections.LOCALTRADER] },
{ key: WalletsListSections.TRANSACTIONS, data: dataSource },
]}
/>
{renderScanButton()}
</View>
</View>
);
};
export default WalletsList;
const styles = StyleSheet.create({
root: {
flex: 1,
},
scrollContent: {
top: 0,
left: 0,

View File

@ -463,17 +463,29 @@ const ViewEditMultisigCosigners = () => {
</View>
);
const howMany = <Badge value={wallet.getM()} badgeStyle={[styles.tipLabel, stylesHook.tipLabel]} textStyle={[styles.tipLabelText, stylesHook.tipLabelText]} />;
const howMany = (
<Badge
value={wallet.getM()}
badgeStyle={[styles.tipLabel, stylesHook.tipLabel]}
textStyle={[styles.tipLabelText, stylesHook.tipLabelText]}
/>
);
const andHere = <Badge value={wallet.howManySignaturesCanWeMake()} badgeStyle={[styles.tipLabel, stylesHook.tipLabel]} textStyle={[styles.tipLabelText, stylesHook.tipLabelText]} />;
const andHere = (
<Badge
value={wallet.howManySignaturesCanWeMake()}
badgeStyle={[styles.tipLabel, stylesHook.tipLabel]}
textStyle={[styles.tipLabelText, stylesHook.tipLabelText]}
/>
);
const tipKeys = () => {
return (
<View>
<BlueSpacing20 />
<Text style={[styles.tipKeys, stylesHook.tipKeys]}>
{loc.formatString(loc.multisig.signatures_required_to_spend, {number: howMany} )}
{loc.formatString(loc.multisig.signatures_we_can_make, { number: andHere} )}
{loc.formatString(loc.multisig.signatures_required_to_spend, { number: howMany })}
{loc.formatString(loc.multisig.signatures_we_can_make, { number: andHere })}
</Text>
<BlueSpacing10 />
<BlueSpacing20 />
@ -491,9 +503,14 @@ const ViewEditMultisigCosigners = () => {
behavior={Platform.OS === 'ios' ? 'padding' : null}
keyboardVerticalOffset={62}
style={[styles.mainBlock, styles.root]}
>
<FlatList ListHeaderComponent={tipKeys} data={data.current} extraData={vaultKeyData} renderItem={_renderKeyItem} keyExtractor={(_item, index) => `${index}`} />
>
<FlatList
ListHeaderComponent={tipKeys}
data={data.current}
extraData={vaultKeyData}
renderItem={_renderKeyItem}
keyExtractor={(_item, index) => `${index}`}
/>
<BlueSpacing10 />
{footer}
<BlueSpacing40 />
@ -613,7 +630,7 @@ const styles = StyleSheet.create({
},
tipLabelText: {
fontWeight: '500',
}
},
});
ViewEditMultisigCosigners.navigationOptions = ({ navigation }) => ({