mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-20 14:05:27 +01:00
FIX: Remove padding
This commit is contained in:
parent
bde372a8f4
commit
63b1842699
11 changed files with 79 additions and 96 deletions
|
@ -146,9 +146,6 @@ const styles = StyleSheet.create({
|
|||
alignItems: 'center',
|
||||
justifyContent: 'flex-start',
|
||||
},
|
||||
blueArea: {
|
||||
paddingTop: 19,
|
||||
},
|
||||
mainCard: {
|
||||
padding: 0,
|
||||
display: 'flex',
|
||||
|
|
|
@ -5,7 +5,6 @@ import Notifications from '../../blue_modules/notifications';
|
|||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import ListItem from '../../components/ListItem';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
|
||||
const NetworkSettings = () => {
|
||||
const { navigate } = useNavigation();
|
||||
|
@ -19,20 +18,18 @@ const NetworkSettings = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<SafeArea>
|
||||
<ScrollView>
|
||||
<ListItem title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} testID="ElectrumSettings" chevron />
|
||||
<ListItem title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} testID="LightningSettings" chevron />
|
||||
{Notifications.isNotificationsCapable && (
|
||||
<ListItem
|
||||
title={loc.settings.notifications}
|
||||
onPress={() => navigate('NotificationSettings')}
|
||||
testID="NotificationSettings"
|
||||
chevron
|
||||
/>
|
||||
)}
|
||||
</ScrollView>
|
||||
</SafeArea>
|
||||
<ScrollView contentInsetAdjustmentBehavior="automatic" automaticallyAdjustContentInsets>
|
||||
<ListItem title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} testID="ElectrumSettings" chevron />
|
||||
<ListItem title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} testID="LightningSettings" chevron />
|
||||
{Notifications.isNotificationsCapable && (
|
||||
<ListItem
|
||||
title={loc.settings.notifications}
|
||||
onPress={() => navigate('NotificationSettings')}
|
||||
testID="NotificationSettings"
|
||||
chevron
|
||||
/>
|
||||
)}
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ const About = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<ScrollView testID="AboutScrollView" contentInsetAdjustmentBehavior="automatic">
|
||||
<ScrollView testID="AboutScrollView" contentInsetAdjustmentBehavior="automatic" automaticallyAdjustContentInsets>
|
||||
<BlueCard>
|
||||
<View style={styles.center}>
|
||||
<Image style={styles.logo} source={require('../../img/bluebeast.png')} />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useContext, useLayoutEffect } from 'react';
|
||||
import { FlatList, StyleSheet } from 'react-native';
|
||||
import { FlatList, StyleSheet, View } from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
|
@ -11,7 +11,6 @@ import dayjs from 'dayjs';
|
|||
import alert from '../../components/Alert';
|
||||
import { useTheme } from '../../components/themes';
|
||||
import ListItem from '../../components/ListItem';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
dayjs.extend(require('dayjs/plugin/calendar'));
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
|
@ -56,9 +55,10 @@ const Currency = () => {
|
|||
}, [setOptions]);
|
||||
|
||||
return (
|
||||
<SafeArea>
|
||||
<View style={styles.flex}>
|
||||
<FlatList
|
||||
style={styles.flex}
|
||||
contentInsetAdjustmentBehavior="automatic"
|
||||
automaticallyAdjustContentInsets
|
||||
keyExtractor={(_item, index) => `${index}`}
|
||||
data={data}
|
||||
initialNumToRender={50}
|
||||
|
@ -102,7 +102,7 @@ const Currency = () => {
|
|||
{loc.settings.last_updated}: {dayjs(currencyRate.LastUpdated).calendar() ?? loc._.never}
|
||||
</BlueText>
|
||||
</BlueCard>
|
||||
</SafeArea>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { View, TouchableWithoutFeedback } from 'react-native';
|
||||
import { View, TouchableWithoutFeedback, ScrollView } from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
|
@ -8,7 +8,6 @@ import OnAppLaunch from '../../class/on-app-launch';
|
|||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import ListItem from '../../components/ListItem';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
|
||||
const DefaultView = () => {
|
||||
const [defaultWalletLabel, setDefaultWalletLabel] = useState('');
|
||||
|
@ -54,7 +53,7 @@ const DefaultView = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<SafeArea>
|
||||
<ScrollView automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
|
||||
<View>
|
||||
<ListItem
|
||||
title={loc.settings.default_wallets}
|
||||
|
@ -72,7 +71,7 @@ const DefaultView = () => {
|
|||
<ListItem title={loc.settings.default_info} onPress={selectWallet} rightTitle={defaultWalletLabel} chevron />
|
||||
)}
|
||||
</View>
|
||||
</SafeArea>
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
|||
import Button from '../../components/Button';
|
||||
import ListItem from '../../components/ListItem';
|
||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
|
||||
const BlueElectrum = require('../../blue_modules/BlueElectrum');
|
||||
|
||||
|
@ -422,23 +421,21 @@ export default class ElectrumSettings extends Component {
|
|||
|
||||
render() {
|
||||
return (
|
||||
<SafeArea>
|
||||
<ScrollView keyboardShouldPersistTaps="always">
|
||||
<ListItem
|
||||
Component={Pressable}
|
||||
title={loc.settings.electrum_offline_mode}
|
||||
switch={{
|
||||
onValueChange: this.onElectrumConnectionEnabledSwitchValueChangd,
|
||||
value: this.state.isOfflineMode,
|
||||
testID: 'ElectrumConnectionEnabledSwitch',
|
||||
}}
|
||||
/>
|
||||
<BlueCard>
|
||||
<BlueText>{loc.settings.electrum_offline_description}</BlueText>
|
||||
</BlueCard>
|
||||
{!this.state.isOfflineMode && this.renderElectrumSettings()}
|
||||
</ScrollView>
|
||||
</SafeArea>
|
||||
<ScrollView keyboardShouldPersistTaps="always" automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
|
||||
<ListItem
|
||||
Component={Pressable}
|
||||
title={loc.settings.electrum_offline_mode}
|
||||
switch={{
|
||||
onValueChange: this.onElectrumConnectionEnabledSwitchValueChangd,
|
||||
value: this.state.isOfflineMode,
|
||||
testID: 'ElectrumConnectionEnabledSwitch',
|
||||
}}
|
||||
/>
|
||||
<BlueCard>
|
||||
<BlueText>{loc.settings.electrum_offline_description}</BlueText>
|
||||
</BlueCard>
|
||||
{!this.state.isOfflineMode && this.renderElectrumSettings()}
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import alert from '../../components/Alert';
|
|||
import ListItem from '../../components/ListItem';
|
||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
||||
import { useTheme } from '../../components/themes';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
const prompt = require('../../helpers/prompt');
|
||||
|
||||
const EncryptStorage = () => {
|
||||
|
@ -22,7 +21,6 @@ const EncryptStorage = () => {
|
|||
const { colors } = useTheme();
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
flex: 1,
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
});
|
||||
|
@ -123,45 +121,43 @@ const EncryptStorage = () => {
|
|||
};
|
||||
|
||||
return isLoading ? (
|
||||
<SafeArea>
|
||||
<ScrollView>
|
||||
<BlueLoading />
|
||||
</SafeArea>
|
||||
</ScrollView>
|
||||
) : (
|
||||
<SafeArea>
|
||||
<ScrollView contentContainerStyle={styles.root}>
|
||||
{biometrics.isDeviceBiometricCapable && (
|
||||
<>
|
||||
<BlueHeaderDefaultSub leftText={loc.settings.biometrics} rightComponent={null} />
|
||||
<ListItem
|
||||
title={loc.formatString(loc.settings.encrypt_use, { type: biometrics.biometricsType })}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ value: biometrics.isBiometricsEnabled, onValueChange: onUseBiometricSwitch }}
|
||||
/>
|
||||
<BlueCard>
|
||||
<BlueText>{loc.formatString(loc.settings.encrypt_use_expl, { type: biometrics.biometricsType })}</BlueText>
|
||||
</BlueCard>
|
||||
<BlueSpacing20 />
|
||||
</>
|
||||
)}
|
||||
<BlueHeaderDefaultSub leftText={loc.settings.encrypt_tstorage} rightComponent={null} />
|
||||
<ListItem
|
||||
testID="EncyptedAndPasswordProtected"
|
||||
hideChevron
|
||||
title={loc.settings.encrypt_enc_and_pass}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ onValueChange: onEncryptStorageSwitch, value: storageIsEncryptedSwitchEnabled }}
|
||||
/>
|
||||
{storageIsEncryptedSwitchEnabled && (
|
||||
<ScrollView contentContainerStyle={styles.root} automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
|
||||
{biometrics.isDeviceBiometricCapable && (
|
||||
<>
|
||||
<BlueHeaderDefaultSub leftText={loc.settings.biometrics} rightComponent={null} />
|
||||
<ListItem
|
||||
onPress={navigateToPlausibleDeniability}
|
||||
title={loc.settings.plausible_deniability}
|
||||
chevron
|
||||
testID="PlausibleDeniabilityButton"
|
||||
Component={TouchableOpacity}
|
||||
title={loc.formatString(loc.settings.encrypt_use, { type: biometrics.biometricsType })}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ value: biometrics.isBiometricsEnabled, onValueChange: onUseBiometricSwitch }}
|
||||
/>
|
||||
)}
|
||||
</ScrollView>
|
||||
</SafeArea>
|
||||
<BlueCard>
|
||||
<BlueText>{loc.formatString(loc.settings.encrypt_use_expl, { type: biometrics.biometricsType })}</BlueText>
|
||||
</BlueCard>
|
||||
<BlueSpacing20 />
|
||||
</>
|
||||
)}
|
||||
<BlueHeaderDefaultSub leftText={loc.settings.encrypt_tstorage} rightComponent={null} />
|
||||
<ListItem
|
||||
testID="EncyptedAndPasswordProtected"
|
||||
hideChevron
|
||||
title={loc.settings.encrypt_enc_and_pass}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ onValueChange: onEncryptStorageSwitch, value: storageIsEncryptedSwitchEnabled }}
|
||||
/>
|
||||
{storageIsEncryptedSwitchEnabled && (
|
||||
<ListItem
|
||||
onPress={navigateToPlausibleDeniability}
|
||||
title={loc.settings.plausible_deniability}
|
||||
chevron
|
||||
testID="PlausibleDeniabilityButton"
|
||||
Component={TouchableOpacity}
|
||||
/>
|
||||
)}
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ const Language: React.FC = () => {
|
|||
renderItem={renderItem}
|
||||
initialNumToRender={25}
|
||||
contentInsetAdjustmentBehavior="automatic"
|
||||
automaticallyAdjustContentInsets
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { View, TextInput, Linking, StyleSheet, Alert, I18nManager } from 'react-native';
|
||||
import { View, TextInput, Linking, StyleSheet, Alert, I18nManager, ScrollView } from 'react-native';
|
||||
import { Button as ButtonRNElements } from 'react-native-elements';
|
||||
import { useNavigation, useRoute, RouteProp } from '@react-navigation/native';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
|
@ -12,7 +12,6 @@ import DeeplinkSchemaMatch from '../../class/deeplink-schema-match';
|
|||
import alert from '../../components/Alert';
|
||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
||||
import { Button } from '../../components/Button';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
|
||||
const BlueApp = require('../../BlueApp');
|
||||
const AppStorage = BlueApp.AppStorage;
|
||||
|
@ -131,7 +130,7 @@ const LightningSettings: React.FC & { navigationOptions: NavigationOptionsGetter
|
|||
};
|
||||
|
||||
return (
|
||||
<SafeArea>
|
||||
<ScrollView automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
|
||||
<BlueCard>
|
||||
<BlueText>{loc.settings.lightning_settings_explain}</BlueText>
|
||||
</BlueCard>
|
||||
|
@ -172,7 +171,7 @@ const LightningSettings: React.FC & { navigationOptions: NavigationOptionsGetter
|
|||
<BlueSpacing20 />
|
||||
{isLoading ? <BlueLoading /> : <Button testID="Save" onPress={save} title={loc.settings.save} />}
|
||||
</BlueCard>
|
||||
</SafeArea>
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ const NotificationSettings = () => {
|
|||
return isLoading ? (
|
||||
<BlueLoading />
|
||||
) : (
|
||||
<ScrollView style={stylesWithThemeHook.scroll}>
|
||||
<ScrollView style={stylesWithThemeHook.scroll} automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
|
||||
<ListItem
|
||||
Component={TouchableWithoutFeedback}
|
||||
title={loc.settings.push_notifications}
|
||||
|
|
|
@ -5,7 +5,6 @@ import { useNavigation } from '@react-navigation/native';
|
|||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import ListItem from '../../components/ListItem';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
|
||||
const NetworkSettings = () => {
|
||||
const { navigate } = useNavigation();
|
||||
|
@ -23,13 +22,11 @@ const NetworkSettings = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<SafeArea>
|
||||
<ScrollView>
|
||||
<ListItem title={loc.is_it_my_address.title} onPress={navigateToIsItMyAddress} testID="IsItMyAddress" chevron />
|
||||
<ListItem title={loc.settings.network_broadcast} onPress={navigateToBroadcast} testID="Broadcast" chevron />
|
||||
<ListItem title={loc.autofill_word.title} onPress={navigateToGenerateWord} testID="GenerateWord" chevron />
|
||||
</ScrollView>
|
||||
</SafeArea>
|
||||
<ScrollView contentInsetAdjustmentBehavior="automatic" automaticallyAdjustContentInsets>
|
||||
<ListItem title={loc.is_it_my_address.title} onPress={navigateToIsItMyAddress} testID="IsItMyAddress" chevron />
|
||||
<ListItem title={loc.settings.network_broadcast} onPress={navigateToBroadcast} testID="Broadcast" chevron />
|
||||
<ListItem title={loc.autofill_word.title} onPress={navigateToGenerateWord} testID="GenerateWord" chevron />
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue