mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-03 12:06:21 +01:00
REF: Moved network settings
This commit is contained in:
parent
5f83d8c061
commit
971d92f4e3
3 changed files with 38 additions and 4 deletions
|
@ -11,6 +11,7 @@ import PlausibleDeniability from './screen/plausibledeniability';
|
|||
import LightningSettings from './screen/settings/lightningSettings';
|
||||
import ElectrumSettings from './screen/settings/electrumSettings';
|
||||
import GeneralSettings from './screen/settings/GeneralSettings';
|
||||
import NetworkSettings from './screen/settings/NetworkSettings';
|
||||
import DefaultView from './screen/settings/defaultView';
|
||||
|
||||
import WalletsList from './screen/wallets/list';
|
||||
|
@ -135,6 +136,10 @@ const WalletsStackNavigator = createStackNavigator(
|
|||
screen: GeneralSettings,
|
||||
path: 'GeneralSettings',
|
||||
},
|
||||
NetworkSettings: {
|
||||
screen: NetworkSettings,
|
||||
path: 'NetworkSettings',
|
||||
},
|
||||
PlausibleDeniability: {
|
||||
screen: PlausibleDeniability,
|
||||
path: 'PlausibleDeniability',
|
||||
|
|
30
screen/settings/NetworkSettings.js
Normal file
30
screen/settings/NetworkSettings.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { ScrollView, TouchableOpacity } from 'react-native';
|
||||
import { BlueNavigationStyle, BlueLoading, SafeBlueArea, BlueListItem } from '../../BlueComponents';
|
||||
import { useNavigation } from 'react-navigation-hooks';
|
||||
const loc = require('../../loc');
|
||||
|
||||
const NetworkSettings = () => {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const { navigate } = useNavigation();
|
||||
|
||||
useEffect(() => {
|
||||
setIsLoading(false);
|
||||
});
|
||||
|
||||
return isLoading ? (
|
||||
<BlueLoading />
|
||||
) : (
|
||||
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
|
||||
<ScrollView>
|
||||
<BlueListItem title={loc.settings.lightning_settings} component={TouchableOpacity} onPress={() => navigate('LightningSettings')} />
|
||||
<BlueListItem title={'Electrum server'} component={TouchableOpacity} onPress={() => navigate('ElectrumSettings')} />
|
||||
</ScrollView>
|
||||
</SafeBlueArea>
|
||||
);
|
||||
};
|
||||
NetworkSettings.navigationOptions = {
|
||||
...BlueNavigationStyle(),
|
||||
title: 'Network',
|
||||
};
|
||||
export default NetworkSettings;
|
|
@ -19,11 +19,10 @@ const Settings = () => {
|
|||
<BlueHeaderDefaultSub leftText={loc.settings.header} rightComponent={null} />
|
||||
<ScrollView>
|
||||
<BlueListItem title={'General'} component={TouchableOpacity} onPress={() => navigate('GeneralSettings')} />
|
||||
<BlueListItem title="Security" onPress={() => navigate('EncryptStorage')} component={TouchableOpacity} testID="SecurityButton" />
|
||||
<BlueListItem title={loc.settings.lightning_settings} component={TouchableOpacity} onPress={() => navigate('LightningSettings')} />
|
||||
<BlueListItem title={loc.settings.language} component={TouchableOpacity} onPress={() => navigate('Language')} />
|
||||
<BlueListItem title={loc.settings.currency} component={TouchableOpacity} onPress={() => navigate('Currency')} />
|
||||
<BlueListItem title={'Electrum server'} component={TouchableOpacity} onPress={() => navigate('ElectrumSettings')} />
|
||||
<BlueListItem title={loc.settings.language} component={TouchableOpacity} onPress={() => navigate('Language')} />
|
||||
<BlueListItem title="Security" onPress={() => navigate('EncryptStorage')} component={TouchableOpacity} testID="SecurityButton" />
|
||||
<BlueListItem title="Network" component={TouchableOpacity} onPress={() => navigate('NetworkSettings')} />
|
||||
<BlueListItem title={loc.settings.about} component={TouchableOpacity} onPress={() => navigate('About')} testID="AboutButton" />
|
||||
</ScrollView>
|
||||
</SafeBlueArea>
|
||||
|
|
Loading…
Add table
Reference in a new issue