mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 21:35:21 +01:00
REF: Move general tools under wallet details to "tools" menu
This commit is contained in:
parent
03a22d62b4
commit
3846f965a9
@ -15,6 +15,7 @@ import EncryptStorage from './screen/settings/encryptStorage';
|
|||||||
import PlausibleDeniability from './screen/plausibledeniability';
|
import PlausibleDeniability from './screen/plausibledeniability';
|
||||||
import LightningSettings from './screen/settings/lightningSettings';
|
import LightningSettings from './screen/settings/lightningSettings';
|
||||||
import ElectrumSettings from './screen/settings/electrumSettings';
|
import ElectrumSettings from './screen/settings/electrumSettings';
|
||||||
|
import Tools from './screen/settings/tools';
|
||||||
import GeneralSettings from './screen/settings/GeneralSettings';
|
import GeneralSettings from './screen/settings/GeneralSettings';
|
||||||
import NetworkSettings from './screen/settings/NetworkSettings';
|
import NetworkSettings from './screen/settings/NetworkSettings';
|
||||||
import NotificationSettings from './screen/settings/notificationSettings';
|
import NotificationSettings from './screen/settings/notificationSettings';
|
||||||
@ -152,6 +153,7 @@ const WalletsRoot = () => {
|
|||||||
<WalletsStack.Screen name="LightningSettings" component={LightningSettings} options={LightningSettings.navigationOptions(theme)} />
|
<WalletsStack.Screen name="LightningSettings" component={LightningSettings} options={LightningSettings.navigationOptions(theme)} />
|
||||||
<WalletsStack.Screen name="ElectrumSettings" component={ElectrumSettings} options={ElectrumSettings.navigationOptions(theme)} />
|
<WalletsStack.Screen name="ElectrumSettings" component={ElectrumSettings} options={ElectrumSettings.navigationOptions(theme)} />
|
||||||
<WalletsStack.Screen name="SettingsPrivacy" component={SettingsPrivacy} options={SettingsPrivacy.navigationOptions(theme)} />
|
<WalletsStack.Screen name="SettingsPrivacy" component={SettingsPrivacy} options={SettingsPrivacy.navigationOptions(theme)} />
|
||||||
|
<WalletsStack.Screen name="Tools" component={Tools} options={Tools.navigationOptions(theme)} />
|
||||||
<WalletsStack.Screen name="LNDViewInvoice" component={LNDViewInvoice} options={LNDViewInvoice.navigationOptions(theme)} />
|
<WalletsStack.Screen name="LNDViewInvoice" component={LNDViewInvoice} options={LNDViewInvoice.navigationOptions(theme)} />
|
||||||
<WalletsStack.Screen
|
<WalletsStack.Screen
|
||||||
name="LNDViewAdditionalInvoiceInformation"
|
name="LNDViewAdditionalInvoiceInformation"
|
||||||
|
@ -322,7 +322,8 @@
|
|||||||
"success_transaction_broadcasted" : "Success! You transaction has been broadcasted!",
|
"success_transaction_broadcasted" : "Success! You transaction has been broadcasted!",
|
||||||
"total_balance": "Total Balance",
|
"total_balance": "Total Balance",
|
||||||
"total_balance_explanation": "Display the total balance of all your wallets on your home screen widgets.",
|
"total_balance_explanation": "Display the total balance of all your wallets on your home screen widgets.",
|
||||||
"widgets": "Widgets"
|
"widgets": "Widgets",
|
||||||
|
"tools": "Tools"
|
||||||
},
|
},
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"would_you_like_to_receive_notifications": "Would you like to receive notifications when you get incoming payments?",
|
"would_you_like_to_receive_notifications": "Would you like to receive notifications when you get incoming payments?",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ScrollView } from 'react-native';
|
import { ScrollView } from 'react-native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
|
import Notifications from '../../blue_modules/notifications';
|
||||||
import navigationStyle from '../../components/navigationStyle';
|
import navigationStyle from '../../components/navigationStyle';
|
||||||
import { SafeBlueArea, BlueListItem } from '../../BlueComponents';
|
import { SafeBlueArea, BlueListItem } from '../../BlueComponents';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
@ -26,7 +26,14 @@ const NetworkSettings = () => {
|
|||||||
<ScrollView>
|
<ScrollView>
|
||||||
<BlueListItem title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} testID="ElectrumSettings" chevron />
|
<BlueListItem title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} testID="ElectrumSettings" chevron />
|
||||||
<BlueListItem title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} testID="LightningSettings" chevron />
|
<BlueListItem title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} testID="LightningSettings" chevron />
|
||||||
<BlueListItem title={loc.settings.network_broadcast} onPress={navigateToBroadcast} testID="Broadcast" chevron />
|
{Notifications.isNotificationsCapable && (
|
||||||
|
<BlueListItem
|
||||||
|
title={loc.settings.notifications}
|
||||||
|
onPress={() => navigate('NotificationSettings')}
|
||||||
|
testID="NotificationSettings"
|
||||||
|
chevron
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</SafeBlueArea>
|
</SafeBlueArea>
|
||||||
);
|
);
|
||||||
|
@ -6,7 +6,6 @@ import navigationStyle from '../../components/navigationStyle';
|
|||||||
import { BlueListItem, BlueHeaderDefaultSub } from '../../BlueComponents';
|
import { BlueListItem, BlueHeaderDefaultSub } from '../../BlueComponents';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||||
import Notifications from '../../blue_modules/notifications';
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
root: {
|
root: {
|
||||||
@ -29,15 +28,7 @@ const Settings = () => {
|
|||||||
<BlueListItem title={loc.settings.language} onPress={() => navigate('Language')} testID="Language" chevron />
|
<BlueListItem title={loc.settings.language} onPress={() => navigate('Language')} testID="Language" chevron />
|
||||||
<BlueListItem title={loc.settings.encrypt_title} onPress={() => navigate('EncryptStorage')} testID="SecurityButton" chevron />
|
<BlueListItem title={loc.settings.encrypt_title} onPress={() => navigate('EncryptStorage')} testID="SecurityButton" chevron />
|
||||||
<BlueListItem title={loc.settings.network} onPress={() => navigate('NetworkSettings')} testID="NetworkSettings" chevron />
|
<BlueListItem title={loc.settings.network} onPress={() => navigate('NetworkSettings')} testID="NetworkSettings" chevron />
|
||||||
{Notifications.isNotificationsCapable && (
|
<BlueListItem title={loc.settings.tools} onPress={() => navigate('Tools')} testID="Tools" chevron />
|
||||||
<BlueListItem
|
|
||||||
title={loc.settings.notifications}
|
|
||||||
onPress={() => navigate('NotificationSettings')}
|
|
||||||
testID="NotificationSettings"
|
|
||||||
chevron
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<BlueListItem title={loc.settings.privacy} onPress={() => navigate('SettingsPrivacy')} testID="SettingsPrivacy" chevron />
|
|
||||||
<BlueListItem title={loc.settings.about} onPress={() => navigate('About')} testID="AboutButton" chevron />
|
<BlueListItem title={loc.settings.about} onPress={() => navigate('About')} testID="AboutButton" chevron />
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
|
38
screen/settings/tools.js
Normal file
38
screen/settings/tools.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { ScrollView } from 'react-native';
|
||||||
|
import { useNavigation } from '@react-navigation/native';
|
||||||
|
|
||||||
|
import navigationStyle from '../../components/navigationStyle';
|
||||||
|
import { SafeBlueArea, BlueListItem } from '../../BlueComponents';
|
||||||
|
import loc from '../../loc';
|
||||||
|
|
||||||
|
const NetworkSettings = () => {
|
||||||
|
const { navigate } = useNavigation();
|
||||||
|
|
||||||
|
const navigateToIsItMyAddress = () => {
|
||||||
|
navigate('IsItMyAddress');
|
||||||
|
};
|
||||||
|
|
||||||
|
const navigateToBroadcast = () => {
|
||||||
|
navigate('Broadcast');
|
||||||
|
};
|
||||||
|
|
||||||
|
const navigateToPrivacy = () => {
|
||||||
|
navigate('SettingsPrivacy');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SafeBlueArea>
|
||||||
|
<ScrollView>
|
||||||
|
<BlueListItem title={loc.is_it_my_address.title} onPress={navigateToIsItMyAddress} testID="IsItMyAddress" chevron />
|
||||||
|
<BlueListItem title={loc.settings.network_broadcast} onPress={navigateToBroadcast} testID="Broadcast" chevron />
|
||||||
|
<BlueListItem title={loc.settings.privacy} onPress={navigateToPrivacy} testID="SettingsPrivacy" chevron />
|
||||||
|
</ScrollView>
|
||||||
|
</SafeBlueArea>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
NetworkSettings.navigationOptions = navigationStyle({}, opts => ({ ...opts, title: loc.settings.tools }));
|
||||||
|
|
||||||
|
export default NetworkSettings;
|
@ -553,16 +553,6 @@ const WalletDetails = () => {
|
|||||||
{renderMarketplaceButton()}
|
{renderMarketplaceButton()}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{wallet.type !== LightningCustodianWallet.type && (
|
|
||||||
<>
|
|
||||||
<BlueSpacing20 />
|
|
||||||
<SecondButton onPress={navigateToBroadcast} testID="Broadcast" title={loc.settings.network_broadcast} />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<>
|
|
||||||
<BlueSpacing20 />
|
|
||||||
<SecondButton onPress={navigateToIsItMyAddress} testID="IsItMyAddress" title={loc.is_it_my_address.title} />
|
|
||||||
</>
|
|
||||||
{wallet.allowSignVerifyMessage() && (
|
{wallet.allowSignVerifyMessage() && (
|
||||||
<>
|
<>
|
||||||
<BlueSpacing20 />
|
<BlueSpacing20 />
|
||||||
|
Loading…
Reference in New Issue
Block a user