mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 13:26:33 +01:00
REF: navigation styles
This commit is contained in:
parent
68751fb16e
commit
002752f643
@ -510,90 +510,6 @@ export const BlueAlertWalletExportReminder = ({ onSuccess = () => {}, onFailure
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueNavigationStyle = (navigation, withNavigationCloseButton = false, customCloseButtonFunction = undefined) => {
|
||||
let headerRight;
|
||||
const { colors, closeImage } = useTheme();
|
||||
if (withNavigationCloseButton) {
|
||||
headerRight = () => (
|
||||
<TouchableOpacity
|
||||
style={{ width: 40, height: 40, padding: 14 }}
|
||||
onPress={
|
||||
customCloseButtonFunction === undefined
|
||||
? () => {
|
||||
Keyboard.dismiss();
|
||||
navigation.goBack(null);
|
||||
}
|
||||
: customCloseButtonFunction
|
||||
}
|
||||
>
|
||||
<Image style={{ alignSelf: 'center' }} source={closeImage} />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
} else {
|
||||
headerRight = null;
|
||||
}
|
||||
|
||||
return {
|
||||
headerStyle: {
|
||||
borderBottomWidth: 0,
|
||||
elevation: 0,
|
||||
shadowOpacity: 0,
|
||||
shadowOffset: { height: 0, width: 0 },
|
||||
},
|
||||
headerTitleStyle: {
|
||||
fontWeight: '600',
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
headerRight,
|
||||
headerBackTitleVisible: false,
|
||||
headerTintColor: colors.foregroundColor,
|
||||
};
|
||||
};
|
||||
|
||||
export const BlueCreateTxNavigationStyle = (navigation, withAdvancedOptionsMenuButton = false, advancedOptionsMenuButtonAction) => {
|
||||
const { colors, closeImage } = useTheme();
|
||||
|
||||
let headerRight;
|
||||
if (withAdvancedOptionsMenuButton) {
|
||||
headerRight = () => (
|
||||
<TouchableOpacity
|
||||
style={{ minWidth: 40, height: 40, justifyContent: 'center' }}
|
||||
onPress={advancedOptionsMenuButtonAction}
|
||||
testID="advancedOptionsMenuButton"
|
||||
>
|
||||
<Icon size={22} name="kebab-horizontal" type="octicon" color={colors.foregroundColor} />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
} else {
|
||||
headerRight = null;
|
||||
}
|
||||
return {
|
||||
headerStyle: {
|
||||
borderBottomWidth: 0,
|
||||
elevation: 0,
|
||||
shadowOffset: { height: 0, width: 0 },
|
||||
},
|
||||
headerTitleStyle: {
|
||||
fontWeight: '600',
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
headerTintColor: colors.foregroundColor,
|
||||
headerLeft: () => (
|
||||
<TouchableOpacity
|
||||
style={{ minWidth: 40, height: 40, justifyContent: 'center', paddingHorizontal: 14 }}
|
||||
onPress={() => {
|
||||
Keyboard.dismiss();
|
||||
navigation.goBack(null);
|
||||
}}
|
||||
>
|
||||
<Image style={{}} source={closeImage} />
|
||||
</TouchableOpacity>
|
||||
),
|
||||
headerRight,
|
||||
headerBackTitle: null,
|
||||
};
|
||||
};
|
||||
|
||||
export const BluePrivateBalance = () => {
|
||||
return Platform.select({
|
||||
ios: (
|
||||
|
530
Navigation.js
530
Navigation.js
@ -2,6 +2,7 @@ import React from 'react';
|
||||
import { createStackNavigator, TransitionPresets } from '@react-navigation/stack';
|
||||
import { createDrawerNavigator } from '@react-navigation/drawer';
|
||||
import { Platform, useWindowDimensions, Dimensions } from 'react-native';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
import Settings from './screen/settings/settings';
|
||||
import About from './screen/settings/about';
|
||||
@ -109,148 +110,197 @@ const defaultStackScreenOptions =
|
||||
};
|
||||
|
||||
const WalletsStack = createStackNavigator();
|
||||
const WalletsRoot = () => (
|
||||
<WalletsStack.Navigator {...(Platform.OS === 'android' ? { screenOptions: defaultScreenOptions } : null)}>
|
||||
<WalletsStack.Screen name="WalletsList" component={WalletsList} />
|
||||
<WalletsStack.Screen name="WalletTransactions" component={WalletTransactions} options={WalletTransactions.navigationOptions} />
|
||||
<WalletsStack.Screen name="WalletDetails" component={WalletDetails} options={WalletDetails.navigationOptions} />
|
||||
<WalletsStack.Screen name="TransactionDetails" component={TransactionDetails} options={TransactionDetails.navigationOptions} />
|
||||
<WalletsStack.Screen name="TransactionStatus" component={TransactionStatus} options={TransactionStatus.navigationOptions} />
|
||||
<WalletsStack.Screen name="HodlHodl" component={HodlHodl} options={HodlHodl.navigationOptions} />
|
||||
<WalletsStack.Screen name="CPFP" component={CPFP} options={CPFP.navigationOptions} />
|
||||
<WalletsStack.Screen name="RBFBumpFee" component={RBFBumpFee} options={RBFBumpFee.navigationOptions} />
|
||||
<WalletsStack.Screen name="RBFCancel" component={RBFCancel} options={RBFCancel.navigationOptions} />
|
||||
<WalletsStack.Screen name="Settings" component={Settings} options={Settings.navigationOptions} />
|
||||
<WalletsStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions} />
|
||||
<WalletsStack.Screen name="Currency" component={Currency} options={Currency.navigationOptions} />
|
||||
<WalletsStack.Screen name="About" component={About} options={About.navigationOptions} />
|
||||
<WalletsStack.Screen name="ReleaseNotes" component={ReleaseNotes} options={ReleaseNotes.navigationOptions} />
|
||||
<WalletsStack.Screen name="Selftest" component={Selftest} options={Selftest.navigationOptions} />
|
||||
<WalletsStack.Screen name="Licensing" component={Licensing} options={Licensing.navigationOptions} />
|
||||
<WalletsStack.Screen name="DefaultView" component={DefaultView} options={DefaultView.navigationOptions} />
|
||||
<WalletsStack.Screen name="Language" component={Language} options={Language.navigationOptions} />
|
||||
<WalletsStack.Screen name="EncryptStorage" component={EncryptStorage} options={EncryptStorage.navigationOptions} />
|
||||
<WalletsStack.Screen name="GeneralSettings" component={GeneralSettings} options={GeneralSettings.navigationOptions} />
|
||||
<WalletsStack.Screen name="NetworkSettings" component={NetworkSettings} options={NetworkSettings.navigationOptions} />
|
||||
<WalletsStack.Screen name="NotificationSettings" component={NotificationSettings} options={NotificationSettings.navigationOptions} />
|
||||
<WalletsStack.Screen name="PlausibleDeniability" component={PlausibleDeniability} options={PlausibleDeniability.navigationOptions} />
|
||||
<WalletsStack.Screen name="LightningSettings" component={LightningSettings} options={LightningSettings.navigationOptions} />
|
||||
<WalletsStack.Screen name="ElectrumSettings" component={ElectrumSettings} options={ElectrumSettings.navigationOptions} />
|
||||
<WalletsStack.Screen name="SettingsPrivacy" component={SettingsPrivacy} options={SettingsPrivacy.navigationOptions} />
|
||||
<WalletsStack.Screen name="LNDViewInvoice" component={LNDViewInvoice} options={LNDViewInvoice.navigationOptions} />
|
||||
<WalletsStack.Screen
|
||||
name="LNDViewAdditionalInvoiceInformation"
|
||||
component={LNDViewAdditionalInvoiceInformation}
|
||||
options={LNDViewAdditionalInvoiceInformation.navigationOptions}
|
||||
/>
|
||||
<WalletsStack.Screen
|
||||
name="LNDViewAdditionalInvoicePreImage"
|
||||
component={LNDViewAdditionalInvoicePreImage}
|
||||
options={LNDViewAdditionalInvoicePreImage.navigationOptions}
|
||||
/>
|
||||
<WalletsStack.Screen name="HodlHodlViewOffer" component={HodlHodlViewOffer} options={HodlHodlViewOffer.navigationOptions} />
|
||||
<WalletsStack.Screen name="Broadcast" component={Broadcast} options={Broadcast.navigationOptions} />
|
||||
<WalletsStack.Screen name="IsItMyAddress" component={IsItMyAddress} options={IsItMyAddress.navigationOptions} />
|
||||
<WalletsStack.Screen name="LnurlPay" component={LnurlPay} options={LnurlPay.navigationOptions} />
|
||||
<WalletsStack.Screen name="LnurlPaySuccess" component={LnurlPaySuccess} options={LnurlPaySuccess.navigationOptions} />
|
||||
<WalletsStack.Screen
|
||||
name="Success"
|
||||
component={Success}
|
||||
options={{
|
||||
headerShown: false,
|
||||
gestureEnabled: false,
|
||||
}}
|
||||
/>
|
||||
</WalletsStack.Navigator>
|
||||
);
|
||||
|
||||
const WalletsRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<WalletsStack.Navigator {...(Platform.OS === 'android' ? { screenOptions: defaultScreenOptions } : null)}>
|
||||
<WalletsStack.Screen name="WalletsList" component={WalletsList} />
|
||||
<WalletsStack.Screen name="WalletTransactions" component={WalletTransactions} options={WalletTransactions.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="WalletDetails" component={WalletDetails} options={WalletDetails.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="TransactionDetails" component={TransactionDetails} options={TransactionDetails.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="TransactionStatus" component={TransactionStatus} options={TransactionStatus.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="HodlHodl" component={HodlHodl} options={HodlHodl.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="HodlHodlViewOffer" component={HodlHodlViewOffer} options={HodlHodlViewOffer.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="CPFP" component={CPFP} options={CPFP.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="RBFBumpFee" component={RBFBumpFee} options={RBFBumpFee.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="RBFCancel" component={RBFCancel} options={RBFCancel.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="Settings" component={Settings} options={Settings.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="Currency" component={Currency} options={Currency.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="About" component={About} options={About.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="ReleaseNotes" component={ReleaseNotes} options={ReleaseNotes.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="Selftest" component={Selftest} options={Selftest.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="Licensing" component={Licensing} options={Licensing.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="DefaultView" component={DefaultView} options={DefaultView.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="Language" component={Language} options={Language.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="EncryptStorage" component={EncryptStorage} options={EncryptStorage.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="GeneralSettings" component={GeneralSettings} options={GeneralSettings.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="NetworkSettings" component={NetworkSettings} options={NetworkSettings.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen
|
||||
name="NotificationSettings"
|
||||
component={NotificationSettings}
|
||||
options={NotificationSettings.navigationOptions(theme)}
|
||||
/>
|
||||
<WalletsStack.Screen
|
||||
name="PlausibleDeniability"
|
||||
component={PlausibleDeniability}
|
||||
options={PlausibleDeniability.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="SettingsPrivacy" component={SettingsPrivacy} options={SettingsPrivacy.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="LNDViewInvoice" component={LNDViewInvoice} options={LNDViewInvoice.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen
|
||||
name="LNDViewAdditionalInvoiceInformation"
|
||||
component={LNDViewAdditionalInvoiceInformation}
|
||||
options={LNDViewAdditionalInvoiceInformation.navigationOptions(theme)}
|
||||
/>
|
||||
<WalletsStack.Screen
|
||||
name="LNDViewAdditionalInvoicePreImage"
|
||||
component={LNDViewAdditionalInvoicePreImage}
|
||||
options={LNDViewAdditionalInvoicePreImage.navigationOptions(theme)}
|
||||
/>
|
||||
<WalletsStack.Screen name="Broadcast" component={Broadcast} options={Broadcast.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="IsItMyAddress" component={IsItMyAddress} options={IsItMyAddress.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="LnurlPay" component={LnurlPay} options={LnurlPay.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen name="LnurlPaySuccess" component={LnurlPaySuccess} options={LnurlPaySuccess.navigationOptions(theme)} />
|
||||
<WalletsStack.Screen
|
||||
name="Success"
|
||||
component={Success}
|
||||
options={{
|
||||
headerShown: false,
|
||||
gestureEnabled: false,
|
||||
}}
|
||||
/>
|
||||
</WalletsStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const AddWalletStack = createStackNavigator();
|
||||
const AddWalletRoot = () => (
|
||||
<AddWalletStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<AddWalletStack.Screen name="AddWallet" component={AddWallet} options={AddWallet.navigationOptions} />
|
||||
<AddWalletStack.Screen name="ImportWallet" component={ImportWallet} options={ImportWallet.navigationOptions} />
|
||||
<AddWalletStack.Screen name="PleaseBackup" component={PleaseBackup} options={PleaseBackup.navigationOptions} />
|
||||
<AddWalletStack.Screen name="PleaseBackupLNDHub" component={PleaseBackupLNDHub} options={PleaseBackupLNDHub.navigationOptions} />
|
||||
<AddWalletStack.Screen name="ProvideEntropy" component={ProvideEntropy} options={ProvideEntropy.navigationOptions} />
|
||||
<AddWalletStack.Screen name="WalletsAddMultisig" component={WalletsAddMultisig} options={WalletsAddMultisig.navigationOptions} />
|
||||
<AddWalletStack.Screen
|
||||
name="WalletsAddMultisigStep2"
|
||||
component={WalletsAddMultisigStep2}
|
||||
options={WalletsAddMultisigStep2.navigationOptions}
|
||||
/>
|
||||
<AddWalletStack.Screen
|
||||
name="WalletsAddMultisigHelp"
|
||||
component={WalletsAddMultisigHelp}
|
||||
options={WalletsAddMultisigHelp.navigationOptions}
|
||||
/>
|
||||
</AddWalletStack.Navigator>
|
||||
);
|
||||
const AddWalletRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<AddWalletStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<AddWalletStack.Screen name="AddWallet" component={AddWallet} options={AddWallet.navigationOptions(theme)} />
|
||||
<AddWalletStack.Screen name="ImportWallet" component={ImportWallet} options={ImportWallet.navigationOptions(theme)} />
|
||||
<AddWalletStack.Screen name="PleaseBackup" component={PleaseBackup} options={PleaseBackup.navigationOptions(theme)} />
|
||||
<AddWalletStack.Screen
|
||||
name="PleaseBackupLNDHub"
|
||||
component={PleaseBackupLNDHub}
|
||||
options={PleaseBackupLNDHub.navigationOptions(theme)}
|
||||
/>
|
||||
<AddWalletStack.Screen name="ProvideEntropy" component={ProvideEntropy} options={ProvideEntropy.navigationOptions(theme)} />
|
||||
<AddWalletStack.Screen
|
||||
name="WalletsAddMultisig"
|
||||
component={WalletsAddMultisig}
|
||||
options={WalletsAddMultisig.navigationOptions(theme)}
|
||||
/>
|
||||
<AddWalletStack.Screen
|
||||
name="WalletsAddMultisigStep2"
|
||||
component={WalletsAddMultisigStep2}
|
||||
options={WalletsAddMultisigStep2.navigationOptions(theme)}
|
||||
/>
|
||||
<AddWalletStack.Screen
|
||||
name="WalletsAddMultisigHelp"
|
||||
component={WalletsAddMultisigHelp}
|
||||
options={WalletsAddMultisigHelp.navigationOptions(theme)}
|
||||
/>
|
||||
</AddWalletStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
// CreateTransactionStackNavigator === SendDetailsStack
|
||||
const SendDetailsStack = createStackNavigator();
|
||||
const SendDetailsRoot = () => (
|
||||
<SendDetailsStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<SendDetailsStack.Screen name="SendDetails" component={SendDetails} options={SendDetails.navigationOptions} />
|
||||
<SendDetailsStack.Screen name="Confirm" component={Confirm} options={Confirm.navigationOptions} />
|
||||
<SendDetailsStack.Screen
|
||||
name="PsbtWithHardwareWallet"
|
||||
component={PsbtWithHardwareWallet}
|
||||
options={PsbtWithHardwareWallet.navigationOptions}
|
||||
/>
|
||||
<SendDetailsStack.Screen name="CreateTransaction" component={SendCreate} options={SendCreate.navigationOptions} />
|
||||
<SendDetailsStack.Screen name="PsbtMultisig" component={PsbtMultisig} options={PsbtMultisig.navigationOptions} />
|
||||
<SendDetailsStack.Screen name="PsbtMultisigQRCode" component={PsbtMultisigQRCode} options={PsbtMultisigQRCode.navigationOptions} />
|
||||
<SendDetailsStack.Screen
|
||||
name="Success"
|
||||
component={Success}
|
||||
options={{
|
||||
headerShown: false,
|
||||
gestureEnabled: false,
|
||||
}}
|
||||
/>
|
||||
<SendDetailsStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions} />
|
||||
<SendDetailsStack.Screen name="CoinControl" component={CoinControl} options={CoinControl.navigationOptions} />
|
||||
</SendDetailsStack.Navigator>
|
||||
);
|
||||
const SendDetailsRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<SendDetailsStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<SendDetailsStack.Screen name="SendDetails" component={SendDetails} options={SendDetails.navigationOptions(theme)} />
|
||||
<SendDetailsStack.Screen name="Confirm" component={Confirm} options={Confirm.navigationOptions(theme)} />
|
||||
<SendDetailsStack.Screen
|
||||
name="PsbtWithHardwareWallet"
|
||||
component={PsbtWithHardwareWallet}
|
||||
options={PsbtWithHardwareWallet.navigationOptions(theme)}
|
||||
/>
|
||||
<SendDetailsStack.Screen name="CreateTransaction" component={SendCreate} options={SendCreate.navigationOptions(theme)} />
|
||||
<SendDetailsStack.Screen name="PsbtMultisig" component={PsbtMultisig} options={PsbtMultisig.navigationOptions(theme)} />
|
||||
<SendDetailsStack.Screen
|
||||
name="PsbtMultisigQRCode"
|
||||
component={PsbtMultisigQRCode}
|
||||
options={PsbtMultisigQRCode.navigationOptions(theme)}
|
||||
/>
|
||||
<SendDetailsStack.Screen
|
||||
name="Success"
|
||||
component={Success}
|
||||
options={{
|
||||
headerShown: false,
|
||||
gestureEnabled: false,
|
||||
}}
|
||||
/>
|
||||
<SendDetailsStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions(theme)} />
|
||||
<SendDetailsStack.Screen name="CoinControl" component={CoinControl} options={CoinControl.navigationOptions(theme)} />
|
||||
</SendDetailsStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const LNDCreateInvoiceStack = createStackNavigator();
|
||||
const LNDCreateInvoiceRoot = () => (
|
||||
<LNDCreateInvoiceStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<LNDCreateInvoiceStack.Screen name="LNDCreateInvoice" component={LNDCreateInvoice} options={LNDCreateInvoice.navigationOptions} />
|
||||
<LNDCreateInvoiceStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions} />
|
||||
<LNDCreateInvoiceStack.Screen name="LNDViewInvoice" component={LNDViewInvoice} options={LNDViewInvoice.navigationOptions} />
|
||||
<LNDCreateInvoiceStack.Screen
|
||||
name="LNDViewAdditionalInvoiceInformation"
|
||||
component={LNDViewAdditionalInvoiceInformation}
|
||||
options={LNDViewAdditionalInvoiceInformation.navigationOptions}
|
||||
/>
|
||||
<LNDCreateInvoiceStack.Screen
|
||||
name="LNDViewAdditionalInvoicePreImage"
|
||||
component={LNDViewAdditionalInvoicePreImage}
|
||||
options={LNDViewAdditionalInvoicePreImage.navigationOptions}
|
||||
/>
|
||||
</LNDCreateInvoiceStack.Navigator>
|
||||
);
|
||||
const LNDCreateInvoiceRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<LNDCreateInvoiceStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<LNDCreateInvoiceStack.Screen
|
||||
name="LNDCreateInvoice"
|
||||
component={LNDCreateInvoice}
|
||||
options={LNDCreateInvoice.navigationOptions(theme)}
|
||||
/>
|
||||
<LNDCreateInvoiceStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions(theme)} />
|
||||
<LNDCreateInvoiceStack.Screen name="LNDViewInvoice" component={LNDViewInvoice} options={LNDViewInvoice.navigationOptions(theme)} />
|
||||
<LNDCreateInvoiceStack.Screen
|
||||
name="LNDViewAdditionalInvoiceInformation"
|
||||
component={LNDViewAdditionalInvoiceInformation}
|
||||
options={LNDViewAdditionalInvoiceInformation.navigationOptions(theme)}
|
||||
/>
|
||||
<LNDCreateInvoiceStack.Screen
|
||||
name="LNDViewAdditionalInvoicePreImage"
|
||||
component={LNDViewAdditionalInvoicePreImage}
|
||||
options={LNDViewAdditionalInvoicePreImage.navigationOptions(theme)}
|
||||
/>
|
||||
</LNDCreateInvoiceStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
// LightningScanInvoiceStackNavigator === ScanLndInvoiceStack
|
||||
const ScanLndInvoiceStack = createStackNavigator();
|
||||
const ScanLndInvoiceRoot = () => (
|
||||
<ScanLndInvoiceStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<ScanLndInvoiceStack.Screen name="ScanLndInvoice" component={ScanLndInvoice} options={ScanLndInvoice.navigationOptions} />
|
||||
<ScanLndInvoiceStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions} />
|
||||
<ScanLndInvoiceStack.Screen name="Success" component={Success} options={{ headerShown: false, gestureEnabled: false }} />
|
||||
<ScanLndInvoiceStack.Screen name="LnurlPay" component={LnurlPay} options={LnurlPay.navigationOptions} />
|
||||
<ScanLndInvoiceStack.Screen name="LnurlPaySuccess" component={LnurlPaySuccess} options={LnurlPaySuccess.navigationOptions} />
|
||||
</ScanLndInvoiceStack.Navigator>
|
||||
);
|
||||
const ScanLndInvoiceRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<ScanLndInvoiceStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<ScanLndInvoiceStack.Screen name="ScanLndInvoice" component={ScanLndInvoice} options={ScanLndInvoice.navigationOptions(theme)} />
|
||||
<ScanLndInvoiceStack.Screen name="SelectWallet" component={SelectWallet} options={SelectWallet.navigationOptions(theme)} />
|
||||
<ScanLndInvoiceStack.Screen name="Success" component={Success} options={{ headerShown: false, gestureEnabled: false }} />
|
||||
<ScanLndInvoiceStack.Screen name="LnurlPay" component={LnurlPay} options={LnurlPay.navigationOptions(theme)} />
|
||||
<ScanLndInvoiceStack.Screen name="LnurlPaySuccess" component={LnurlPaySuccess} options={LnurlPaySuccess.navigationOptions(theme)} />
|
||||
</ScanLndInvoiceStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const AztecoRedeemStack = createStackNavigator();
|
||||
const AztecoRedeemRoot = () => (
|
||||
<AztecoRedeemStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<AztecoRedeemStack.Screen name="AztecoRedeem" component={AztecoRedeem} options={AztecoRedeem.navigationOptions} />
|
||||
<AztecoRedeemStack.Screen name="SelectWallet" component={SelectWallet} options={{ headerLeft: null }} />
|
||||
</AztecoRedeemStack.Navigator>
|
||||
);
|
||||
const AztecoRedeemRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<AztecoRedeemStack.Navigator screenOptions={defaultStackScreenOptions}>
|
||||
<AztecoRedeemStack.Screen name="AztecoRedeem" component={AztecoRedeem} options={AztecoRedeem.navigationOptions(theme)} />
|
||||
<AztecoRedeemStack.Screen name="SelectWallet" component={SelectWallet} options={{ headerLeft: null }} />
|
||||
</AztecoRedeemStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const ScanQRCodeStack = createStackNavigator();
|
||||
const ScanQRCodeRoot = () => (
|
||||
@ -274,18 +324,26 @@ const UnlockWithScreenRoot = () => (
|
||||
);
|
||||
|
||||
const HodlHodlLoginStack = createStackNavigator();
|
||||
const HodlHodlLoginRoot = () => (
|
||||
<HodlHodlLoginStack.Navigator name="HodlHodlLoginRoot" screenOptions={defaultStackScreenOptions}>
|
||||
<HodlHodlLoginStack.Screen name="HodlHodlLogin" component={HodlHodlLogin} options={HodlHodlLogin.navigationOptions} />
|
||||
</HodlHodlLoginStack.Navigator>
|
||||
);
|
||||
const HodlHodlLoginRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<HodlHodlLoginStack.Navigator name="HodlHodlLoginRoot" screenOptions={defaultStackScreenOptions}>
|
||||
<HodlHodlLoginStack.Screen name="HodlHodlLogin" component={HodlHodlLogin} options={HodlHodlLogin.navigationOptions(theme)} />
|
||||
</HodlHodlLoginStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const ReorderWalletsStack = createStackNavigator();
|
||||
const ReorderWalletsStackRoot = () => (
|
||||
<ReorderWalletsStack.Navigator name="ReorderWalletsRoot" screenOptions={defaultStackScreenOptions}>
|
||||
<ReorderWalletsStack.Screen name="ReorderWallets" component={ReorderWallets} options={ReorderWallets.navigationOptions} />
|
||||
</ReorderWalletsStack.Navigator>
|
||||
);
|
||||
const ReorderWalletsStackRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<ReorderWalletsStack.Navigator name="ReorderWalletsRoot" screenOptions={defaultStackScreenOptions}>
|
||||
<ReorderWalletsStack.Screen name="ReorderWallets" component={ReorderWallets} options={ReorderWallets.navigationOptions(theme)} />
|
||||
</ReorderWalletsStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const Drawer = createDrawerNavigator();
|
||||
function DrawerRoot() {
|
||||
@ -305,32 +363,48 @@ function DrawerRoot() {
|
||||
}
|
||||
|
||||
const ReceiveDetailsStack = createStackNavigator();
|
||||
const ReceiveDetailsStackRoot = () => (
|
||||
<ReceiveDetailsStack.Navigator name="ReceiveDetailsRoot" screenOptions={defaultStackScreenOptions} initialRouteName="ReceiveDetails">
|
||||
<RootStack.Screen name="ReceiveDetails" component={ReceiveDetails} options={ReceiveDetails.navigationOptions} />
|
||||
</ReceiveDetailsStack.Navigator>
|
||||
);
|
||||
const ReceiveDetailsStackRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<ReceiveDetailsStack.Navigator name="ReceiveDetailsRoot" screenOptions={defaultStackScreenOptions} initialRouteName="ReceiveDetails">
|
||||
<RootStack.Screen name="ReceiveDetails" component={ReceiveDetails} options={ReceiveDetails.navigationOptions(theme)} />
|
||||
</ReceiveDetailsStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const WalletXpubStack = createStackNavigator();
|
||||
const WalletXpubStackRoot = () => (
|
||||
<WalletXpubStack.Navigator name="WalletXpubRoot" screenOptions={defaultStackScreenOptions} initialRouteName="WalletXpub">
|
||||
<WalletXpubStack.Screen name="WalletXpub" component={WalletXpub} options={WalletXpub.navigationOptions} />
|
||||
</WalletXpubStack.Navigator>
|
||||
);
|
||||
const WalletXpubStackRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<WalletXpubStack.Navigator name="WalletXpubRoot" screenOptions={defaultStackScreenOptions} initialRouteName="WalletXpub">
|
||||
<WalletXpubStack.Screen name="WalletXpub" component={WalletXpub} options={WalletXpub.navigationOptions(theme)} />
|
||||
</WalletXpubStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const WalletExportStack = createStackNavigator();
|
||||
const WalletExportStackRoot = () => (
|
||||
<WalletExportStack.Navigator name="WalletExportRoot" screenOptions={defaultStackScreenOptions} initialRouteName="WalletExport">
|
||||
<WalletExportStack.Screen name="WalletExport" component={WalletExport} options={WalletExport.navigationOptions} />
|
||||
</WalletExportStack.Navigator>
|
||||
);
|
||||
const WalletExportStackRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<WalletExportStack.Navigator name="WalletExportRoot" screenOptions={defaultStackScreenOptions} initialRouteName="WalletExport">
|
||||
<WalletExportStack.Screen name="WalletExport" component={WalletExport} options={WalletExport.navigationOptions(theme)} />
|
||||
</WalletExportStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const LappBrowserStack = createStackNavigator();
|
||||
const LappBrowserStackRoot = () => (
|
||||
<LappBrowserStack.Navigator name="LappBrowserRoot" screenOptions={defaultStackScreenOptions} initialRouteName="LappBrowser">
|
||||
<LappBrowserStack.Screen name="LappBrowser" component={LappBrowser} options={LappBrowser.navigationOptions} />
|
||||
</LappBrowserStack.Navigator>
|
||||
);
|
||||
const LappBrowserStackRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<LappBrowserStack.Navigator name="LappBrowserRoot" screenOptions={defaultStackScreenOptions} initialRouteName="LappBrowser">
|
||||
<LappBrowserStack.Screen name="LappBrowser" component={LappBrowser} options={LappBrowser.navigationOptions(theme)} />
|
||||
</LappBrowserStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const InitStack = createStackNavigator();
|
||||
const InitRoot = () => (
|
||||
@ -347,73 +421,85 @@ const InitRoot = () => (
|
||||
);
|
||||
|
||||
const ViewEditMultisigCosignersStack = createStackNavigator();
|
||||
const ViewEditMultisigCosignersRoot = () => (
|
||||
<ViewEditMultisigCosignersStack.Navigator
|
||||
name="ViewEditMultisigCosignersRoot"
|
||||
screenOptions={defaultStackScreenOptions}
|
||||
initialRouteName="ViewEditMultisigCosigners"
|
||||
>
|
||||
<ViewEditMultisigCosignersStack.Screen
|
||||
name="ViewEditMultisigCosigners"
|
||||
component={ViewEditMultisigCosigners}
|
||||
options={ViewEditMultisigCosigners.navigationOptions}
|
||||
/>
|
||||
</ViewEditMultisigCosignersStack.Navigator>
|
||||
);
|
||||
const ViewEditMultisigCosignersRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<ViewEditMultisigCosignersStack.Navigator
|
||||
name="ViewEditMultisigCosignersRoot"
|
||||
screenOptions={defaultStackScreenOptions}
|
||||
initialRouteName="ViewEditMultisigCosigners"
|
||||
>
|
||||
<ViewEditMultisigCosignersStack.Screen
|
||||
name="ViewEditMultisigCosigners"
|
||||
component={ViewEditMultisigCosigners}
|
||||
options={ViewEditMultisigCosigners.navigationOptions(theme)}
|
||||
/>
|
||||
</ViewEditMultisigCosignersStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const ExportMultisigCoordinationSetupStack = createStackNavigator();
|
||||
const ExportMultisigCoordinationSetupRoot = () => (
|
||||
<ExportMultisigCoordinationSetupStack.Navigator
|
||||
name="ExportMultisigCoordinationSetupRoot"
|
||||
screenOptions={defaultStackScreenOptions}
|
||||
initialRouteName="ExportMultisigCoordinationSetup"
|
||||
>
|
||||
<ExportMultisigCoordinationSetupStack.Screen
|
||||
name="ExportMultisigCoordinationSetup"
|
||||
component={ExportMultisigCoordinationSetup}
|
||||
options={ExportMultisigCoordinationSetup.navigationOptions}
|
||||
/>
|
||||
</ExportMultisigCoordinationSetupStack.Navigator>
|
||||
);
|
||||
const ExportMultisigCoordinationSetupRoot = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<ExportMultisigCoordinationSetupStack.Navigator
|
||||
name="ExportMultisigCoordinationSetupRoot"
|
||||
screenOptions={defaultStackScreenOptions}
|
||||
initialRouteName="ExportMultisigCoordinationSetup"
|
||||
>
|
||||
<ExportMultisigCoordinationSetupStack.Screen
|
||||
name="ExportMultisigCoordinationSetup"
|
||||
component={ExportMultisigCoordinationSetup}
|
||||
options={ExportMultisigCoordinationSetup.navigationOptions(theme)}
|
||||
/>
|
||||
</ExportMultisigCoordinationSetupStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
const RootStack = createStackNavigator();
|
||||
const Navigation = () => (
|
||||
<RootStack.Navigator mode="modal" screenOptions={defaultScreenOptions} initialRouteName="LoadingScreenRoot">
|
||||
{/* stacks */}
|
||||
<RootStack.Screen name="WalletsRoot" component={WalletsRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="AddWalletRoot" component={AddWalletRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="SendDetailsRoot" component={SendDetailsRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="LNDCreateInvoiceRoot" component={LNDCreateInvoiceRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="ScanLndInvoiceRoot" component={ScanLndInvoiceRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="AztecoRedeemRoot" component={AztecoRedeemRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="HodlHodlLoginRoot" component={HodlHodlLoginRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="HodlHodlMyContracts" component={HodlHodlMyContracts} options={HodlHodlMyContracts.navigationOptions} />
|
||||
<RootStack.Screen name="HodlHodlWebview" component={HodlHodlWebview} options={HodlHodlWebview.navigationOptions} />
|
||||
const Navigation = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
{/* screens */}
|
||||
<RootStack.Screen name="WalletExportRoot" component={WalletExportStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen
|
||||
name="ExportMultisigCoordinationSetupRoot"
|
||||
component={ExportMultisigCoordinationSetupRoot}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<RootStack.Screen name="ViewEditMultisigCosignersRoot" component={ViewEditMultisigCosignersRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="WalletXpubRoot" component={WalletXpubStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="BuyBitcoin" component={BuyBitcoin} options={BuyBitcoin.navigationOptions} />
|
||||
<RootStack.Screen name="Marketplace" component={Marketplace} options={Marketplace.navigationOptions} />
|
||||
<RootStack.Screen name="SelectWallet" component={SelectWallet} options={{ headerLeft: null }} />
|
||||
<RootStack.Screen name="ReceiveDetailsRoot" component={ReceiveDetailsStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="LappBrowserRoot" component={LappBrowserStackRoot} options={{ headerShown: false }} />
|
||||
return (
|
||||
<RootStack.Navigator mode="modal" screenOptions={defaultScreenOptions} initialRouteName="LoadingScreenRoot">
|
||||
{/* stacks */}
|
||||
<RootStack.Screen name="WalletsRoot" component={WalletsRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="AddWalletRoot" component={AddWalletRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="SendDetailsRoot" component={SendDetailsRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="LNDCreateInvoiceRoot" component={LNDCreateInvoiceRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="ScanLndInvoiceRoot" component={ScanLndInvoiceRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="AztecoRedeemRoot" component={AztecoRedeemRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="HodlHodlLoginRoot" component={HodlHodlLoginRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="HodlHodlMyContracts" component={HodlHodlMyContracts} options={HodlHodlMyContracts.navigationOptions(theme)} />
|
||||
<RootStack.Screen name="HodlHodlWebview" component={HodlHodlWebview} options={HodlHodlWebview.navigationOptions(theme)} />
|
||||
|
||||
<RootStack.Screen
|
||||
name="ScanQRCodeRoot"
|
||||
component={ScanQRCodeRoot}
|
||||
options={{
|
||||
...(Platform.OS === 'ios' ? TransitionPresets.ModalTransition : TransitionPresets.ScaleFromCenterAndroid),
|
||||
headerShown: false,
|
||||
}}
|
||||
/>
|
||||
</RootStack.Navigator>
|
||||
);
|
||||
{/* screens */}
|
||||
<RootStack.Screen name="WalletExportRoot" component={WalletExportStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen
|
||||
name="ExportMultisigCoordinationSetupRoot"
|
||||
component={ExportMultisigCoordinationSetupRoot}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<RootStack.Screen name="ViewEditMultisigCosignersRoot" component={ViewEditMultisigCosignersRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="WalletXpubRoot" component={WalletXpubStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="BuyBitcoin" component={BuyBitcoin} options={BuyBitcoin.navigationOptions(theme)} />
|
||||
<RootStack.Screen name="Marketplace" component={Marketplace} options={Marketplace.navigationOptions(theme)} />
|
||||
<RootStack.Screen name="SelectWallet" component={SelectWallet} options={{ headerLeft: null }} />
|
||||
<RootStack.Screen name="ReceiveDetailsRoot" component={ReceiveDetailsStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="LappBrowserRoot" component={LappBrowserStackRoot} options={{ headerShown: false }} />
|
||||
|
||||
<RootStack.Screen
|
||||
name="ScanQRCodeRoot"
|
||||
component={ScanQRCodeRoot}
|
||||
options={{
|
||||
...(Platform.OS === 'ios' ? TransitionPresets.ModalTransition : TransitionPresets.ScaleFromCenterAndroid),
|
||||
headerShown: false,
|
||||
}}
|
||||
/>
|
||||
</RootStack.Navigator>
|
||||
);
|
||||
};
|
||||
|
||||
export default InitRoot;
|
||||
|
92
components/navigationStyle.js
Normal file
92
components/navigationStyle.js
Normal file
@ -0,0 +1,92 @@
|
||||
import React from 'react';
|
||||
import { Image, Keyboard, TouchableOpacity, StyleSheet } from 'react-native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
minWidth: 40,
|
||||
height: 40,
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 14,
|
||||
},
|
||||
});
|
||||
|
||||
const navigationStyle = ({ closeButton = false, closeButtonFunc, ...opts }, formatter) => {
|
||||
return theme => ({ navigation, route }) => {
|
||||
let headerRight = null;
|
||||
if (closeButton) {
|
||||
const handleClose = closeButtonFunc
|
||||
? () => closeButtonFunc({ navigation, route })
|
||||
: () => {
|
||||
Keyboard.dismiss();
|
||||
navigation.goBack(null);
|
||||
};
|
||||
headerRight = () => (
|
||||
<TouchableOpacity style={styles.button} onPress={handleClose}>
|
||||
<Image source={theme.closeImage} />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
let options = {
|
||||
headerStyle: {
|
||||
borderBottomWidth: 0,
|
||||
elevation: 0,
|
||||
shadowOpacity: 0,
|
||||
shadowOffset: { height: 0, width: 0 },
|
||||
},
|
||||
headerTitleStyle: {
|
||||
fontWeight: '600',
|
||||
color: theme.colors.foregroundColor,
|
||||
},
|
||||
headerRight,
|
||||
headerBackTitleVisible: false,
|
||||
headerTintColor: theme.colors.foregroundColor,
|
||||
...opts,
|
||||
};
|
||||
|
||||
if (formatter) {
|
||||
options = formatter(options, { theme, navigation, route });
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
};
|
||||
|
||||
export default navigationStyle;
|
||||
|
||||
export const navigationStyleTx = (opts, formatter) => {
|
||||
return theme => ({ navigation, route }) => {
|
||||
let options = {
|
||||
headerStyle: {
|
||||
borderBottomWidth: 0,
|
||||
elevation: 0,
|
||||
shadowOffset: { height: 0, width: 0 },
|
||||
},
|
||||
headerTitleStyle: {
|
||||
fontWeight: '600',
|
||||
color: theme.colors.foregroundColor,
|
||||
},
|
||||
// headerBackTitle: null,
|
||||
headerBackTitleVisible: false,
|
||||
headerTintColor: theme.colors.foregroundColor,
|
||||
headerLeft: () => (
|
||||
<TouchableOpacity
|
||||
style={styles.button}
|
||||
onPress={() => {
|
||||
Keyboard.dismiss();
|
||||
navigation.goBack(null);
|
||||
}}
|
||||
>
|
||||
<Image source={theme.closeImage} />
|
||||
</TouchableOpacity>
|
||||
),
|
||||
...opts,
|
||||
};
|
||||
|
||||
if (formatter) {
|
||||
options = formatter(options, { theme, navigation, route });
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
};
|
@ -77,6 +77,7 @@
|
||||
"local_trader": "Local Trader",
|
||||
"local_trader_new": "New",
|
||||
"login": "Login",
|
||||
"logout": "logout",
|
||||
"mycont": "My contracts",
|
||||
"offer_accept": "Accept offer",
|
||||
"offer_account_finish": "Looks like you didn't finish setting up account on HodlHodl. Would you like to finish setup now?",
|
||||
|
@ -1,20 +1,22 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Ionicons from 'react-native-vector-icons/Ionicons';
|
||||
import {
|
||||
TouchableOpacity,
|
||||
ActivityIndicator,
|
||||
TextInput,
|
||||
StatusBar,
|
||||
Keyboard,
|
||||
BackHandler,
|
||||
View,
|
||||
Alert,
|
||||
BackHandler,
|
||||
Keyboard,
|
||||
Platform,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { BlueNavigationStyle, SafeBlueArea } from '../../BlueComponents';
|
||||
import Ionicons from 'react-native-vector-icons/Ionicons';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import Notifications from '../../blue_modules/notifications';
|
||||
import loc from '../../loc';
|
||||
|
||||
@ -516,8 +518,8 @@ Browser.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
Browser.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
Browser.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.wallets.list_ln_browser,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -2,35 +2,36 @@
|
||||
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
View,
|
||||
TextInput,
|
||||
KeyboardAvoidingView,
|
||||
Keyboard,
|
||||
StatusBar,
|
||||
TouchableWithoutFeedback,
|
||||
TouchableOpacity,
|
||||
Text,
|
||||
StyleSheet,
|
||||
Image,
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
TouchableWithoutFeedback,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import {
|
||||
BlueNavigationStyle,
|
||||
BlueButton,
|
||||
BlueBitcoinAmount,
|
||||
BlueDismissKeyboardInputAccessory,
|
||||
BlueAlertWalletExportReminder,
|
||||
BlueBitcoinAmount,
|
||||
BlueButton,
|
||||
BlueDismissKeyboardInputAccessory,
|
||||
BlueLoading,
|
||||
} from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
|
||||
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import loc, { formatBalanceWithoutSuffix, formatBalancePlain } from '../../loc';
|
||||
import Lnurl from '../../class/lnurl';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import Notifications from '../../blue_modules/notifications';
|
||||
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
const LNDCreateInvoice = () => {
|
||||
@ -496,8 +497,8 @@ const styles = StyleSheet.create({
|
||||
|
||||
export default LNDCreateInvoice;
|
||||
|
||||
LNDCreateInvoice.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
LNDCreateInvoice.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
headerTitle: loc.receive.header,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -1,22 +1,15 @@
|
||||
/* global alert */
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { View, Share, StyleSheet } from 'react-native';
|
||||
import {
|
||||
BlueLoading,
|
||||
BlueCopyTextToClipboard,
|
||||
SafeBlueArea,
|
||||
BlueButton,
|
||||
BlueNavigationStyle,
|
||||
BlueText,
|
||||
BlueSpacing20,
|
||||
} from '../../BlueComponents';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import loc from '../../loc';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { BlueButton, BlueCopyTextToClipboard, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
const LNDViewAdditionalInvoiceInformation = () => {
|
||||
// state = { walletInfo: undefined };
|
||||
const { walletID } = useRoute().params;
|
||||
const { wallets } = useContext(BlueStorageContext);
|
||||
const wallet = wallets.find(w => w.getID() === walletID);
|
||||
@ -123,7 +116,6 @@ const styles = StyleSheet.create({
|
||||
|
||||
export default LNDViewAdditionalInvoiceInformation;
|
||||
|
||||
LNDViewAdditionalInvoiceInformation.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
LNDViewAdditionalInvoiceInformation.navigationOptions = navigationStyle({
|
||||
title: loc.lndViewInvoice.additional_info,
|
||||
});
|
||||
|
@ -1,10 +1,12 @@
|
||||
import React from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
import { BlueCopyTextToClipboard, SafeBlueArea, BlueNavigationStyle, BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import loc from '../../loc';
|
||||
import { useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { BlueCopyTextToClipboard, SafeBlueArea, BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
|
||||
const LNDViewAdditionalInvoicePreImage = () => {
|
||||
// state = { walletInfo: undefined };
|
||||
const { colors } = useTheme();
|
||||
@ -59,7 +61,6 @@ const styles = StyleSheet.create({
|
||||
|
||||
export default LNDViewAdditionalInvoicePreImage;
|
||||
|
||||
LNDViewAdditionalInvoicePreImage.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
LNDViewAdditionalInvoicePreImage.navigationOptions = navigationStyle({
|
||||
title: loc.lndViewInvoice.additional_info,
|
||||
});
|
||||
|
@ -1,6 +1,11 @@
|
||||
import React, { useContext, useEffect, useRef, useState } from 'react';
|
||||
import { View, Text, StatusBar, ScrollView, BackHandler, TouchableOpacity, StyleSheet, useWindowDimensions } from 'react-native';
|
||||
import Share from 'react-native-share';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import {
|
||||
BlueLoading,
|
||||
BlueText,
|
||||
@ -8,16 +13,12 @@ import {
|
||||
BlueButton,
|
||||
SecondButton,
|
||||
BlueCopyTextToClipboard,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing20,
|
||||
BlueTextCentered,
|
||||
} from '../../BlueComponents';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import { SuccessView } from '../send/success';
|
||||
|
||||
@ -356,23 +357,28 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
export default LNDViewInvoice;
|
||||
LNDViewInvoice.navigationOptions = navigationStyle(
|
||||
{
|
||||
title: loc.lndViewInvoice.lightning_invoice,
|
||||
closeButton: true,
|
||||
closeButtonFunc: ({ navigation }) => navigation.dangerouslyGetParent().pop(),
|
||||
},
|
||||
(options, { theme, navigation, route }) => {
|
||||
const additionalOptions =
|
||||
route.params.isModal === true
|
||||
? {
|
||||
headerLeft: null,
|
||||
gestureEnabled: false,
|
||||
}
|
||||
: {
|
||||
headerRight: null,
|
||||
};
|
||||
|
||||
LNDViewInvoice.navigationOptions = ({ navigation, route }) =>
|
||||
route.params.isModal === true
|
||||
? {
|
||||
...BlueNavigationStyle(navigation, true, () => navigation.dangerouslyGetParent().pop()),
|
||||
title: loc.lndViewInvoice.lightning_invoice,
|
||||
headerLeft: null,
|
||||
headerStyle: {
|
||||
...BlueNavigationStyle().headerStyle,
|
||||
},
|
||||
gestureEnabled: false,
|
||||
}
|
||||
: {
|
||||
...BlueNavigationStyle(),
|
||||
title: loc.lndViewInvoice.lightning_invoice,
|
||||
headerStyle: {
|
||||
...BlueNavigationStyle().headerStyle,
|
||||
},
|
||||
};
|
||||
return {
|
||||
...options,
|
||||
...additionalOptions,
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
export default LNDViewInvoice;
|
||||
|
@ -1,26 +1,27 @@
|
||||
/* global alert */
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { Image, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import {
|
||||
BlueBitcoinAmount,
|
||||
BlueButton,
|
||||
BlueCard,
|
||||
BlueDismissKeyboardInputAccessory,
|
||||
BlueLoading,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing20,
|
||||
BlueText,
|
||||
SafeBlueArea,
|
||||
} from '../../BlueComponents';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import Lnurl from '../../class/lnurl';
|
||||
import { Image, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
|
||||
import loc, { formatBalanceWithoutSuffix } from '../../loc';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import Biometric from '../../class/biometrics';
|
||||
import PropTypes from 'prop-types';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
@ -268,10 +269,9 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
LnurlPay.navigationOptions = ({ navigation, route }) => {
|
||||
return {
|
||||
...BlueNavigationStyle(navigation, true, () => navigation.dangerouslyGetParent().popToTop()),
|
||||
title: '',
|
||||
headerLeft: null,
|
||||
};
|
||||
};
|
||||
LnurlPay.navigationOptions = navigationStyle({
|
||||
title: '',
|
||||
closeButton: true,
|
||||
closeButtonFunc: ({ navigation }) => navigation.dangerouslyGetParent().popToTop(),
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -1,19 +1,12 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import LottieView from 'lottie-react-native';
|
||||
import { View, Text, Linking, StyleSheet, Image, ScrollView } from 'react-native';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import {
|
||||
BlueButton,
|
||||
BlueButtonLink,
|
||||
BlueNavigationStyle,
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueLoading,
|
||||
BlueText,
|
||||
BlueSpacing20,
|
||||
} from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { BlueButton, BlueButtonLink, BlueCard, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import Lnurl from '../../class/lnurl';
|
||||
import loc from '../../loc';
|
||||
|
||||
@ -201,10 +194,9 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
LnurlPaySuccess.navigationOptions = ({ navigation, route }) => {
|
||||
return {
|
||||
...BlueNavigationStyle(navigation, true, () => navigation.dangerouslyGetParent().popToTop()),
|
||||
title: '',
|
||||
headerLeft: null,
|
||||
};
|
||||
};
|
||||
LnurlPaySuccess.navigationOptions = navigationStyle({
|
||||
title: '',
|
||||
closeButton: true,
|
||||
closeButtonFunc: ({ navigation }) => navigation.dangerouslyGetParent().popToTop(),
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -11,25 +11,26 @@ import {
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
} from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import {
|
||||
BlueButton,
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueDismissKeyboardInputAccessory,
|
||||
BlueNavigationStyle,
|
||||
BlueAddressInput,
|
||||
BlueBitcoinAmount,
|
||||
BlueLoading,
|
||||
} from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
|
||||
import Lnurl from '../../class/lnurl';
|
||||
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import Biometric from '../../class/biometrics';
|
||||
import loc, { formatBalanceWithoutSuffix } from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
const ScanLndInvoice = () => {
|
||||
@ -356,9 +357,8 @@ const ScanLndInvoice = () => {
|
||||
};
|
||||
|
||||
export default ScanLndInvoice;
|
||||
|
||||
ScanLndInvoice.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
ScanLndInvoice.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.send.header,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -1,11 +1,13 @@
|
||||
/* global alert */
|
||||
import React, { useContext, useState } from 'react';
|
||||
import { ScrollView, StyleSheet } from 'react-native';
|
||||
import { BlueLoading, BlueButton, SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, BlueSpacing20 } from '../BlueComponents';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
|
||||
import navigationStyle from '../components/navigationStyle';
|
||||
import { BlueLoading, BlueButton, SafeBlueArea, BlueCard, BlueText, BlueSpacing20 } from '../BlueComponents';
|
||||
import loc from '../loc';
|
||||
import { BlueStorageContext } from '../blue_modules/storage-context';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
const prompt = require('../blue_modules/prompt');
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
@ -85,7 +87,6 @@ const PlausibleDeniability = () => {
|
||||
|
||||
export default PlausibleDeniability;
|
||||
|
||||
PlausibleDeniability.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
PlausibleDeniability.navigationOptions = navigationStyle({
|
||||
title: loc.plausibledeniability.title,
|
||||
});
|
||||
|
@ -3,8 +3,9 @@ import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Keyboard, Text, TouchableOpacity, StatusBar, TouchableWithoutFeedback, View, StyleSheet } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { BlueButton, BlueCreateTxNavigationStyle, BlueLoading, BlueSpacing, BlueText } from '../../BlueComponents';
|
||||
|
||||
import { BlueButton, BlueLoading, BlueSpacing, BlueText } from '../../BlueComponents';
|
||||
import { navigationStyleTx } from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import { PlaceholderWallet } from '../../class';
|
||||
import Azteco from '../../class/azteco';
|
||||
@ -183,7 +184,6 @@ AztecoRedeem.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
AztecoRedeem.navigationOptions = ({ navigation }) => ({
|
||||
...BlueCreateTxNavigationStyle(navigation),
|
||||
AztecoRedeem.navigationOptions = navigationStyleTx({
|
||||
title: loc.azteco.title,
|
||||
});
|
||||
|
@ -26,8 +26,8 @@ import {
|
||||
BlueText,
|
||||
BlueSpacing20,
|
||||
BlueAlertWalletExportReminder,
|
||||
BlueNavigationStyle,
|
||||
} from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import BottomModal from '../../components/BottomModal';
|
||||
import Privacy from '../../Privacy';
|
||||
import { Chain, BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
@ -350,8 +350,8 @@ const ReceiveDetails = () => {
|
||||
);
|
||||
};
|
||||
|
||||
ReceiveDetails.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
ReceiveDetails.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.receive.header,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { Component } from 'react';
|
||||
import { ScrollView, View, StyleSheet } from 'react-native';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, BlueLoading } from '../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ScrollView, View, StyleSheet } from 'react-native';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueCard, BlueText, BlueLoading } from '../BlueComponents';
|
||||
import navigationStyle from '../components/navigationStyle';
|
||||
import { SegwitP2SHWallet, LegacyWallet, HDSegwitP2SHWallet, HDSegwitBech32Wallet } from '../class';
|
||||
import { BlueCurrentTheme } from '../components/themes';
|
||||
const bitcoin = require('bitcoinjs-lib');
|
||||
@ -259,7 +260,6 @@ Selftest.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
Selftest.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
Selftest.navigationOptions = navigationStyle({
|
||||
title: 'Self test',
|
||||
});
|
||||
|
@ -331,8 +331,4 @@ const ScanQRCode = () => {
|
||||
);
|
||||
};
|
||||
|
||||
ScanQRCode.navigationOptions = {
|
||||
headerShown: false,
|
||||
};
|
||||
|
||||
export default ScanQRCode;
|
||||
|
@ -2,19 +2,20 @@ import React, { useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ActivityIndicator, Linking, StyleSheet, View, KeyboardAvoidingView, Platform, TextInput } from 'react-native';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
|
||||
import loc from '../../loc';
|
||||
import { HDSegwitBech32Wallet } from '../../class';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import {
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueBigCheckmark,
|
||||
BlueButton,
|
||||
BlueButtonLink,
|
||||
BlueCard,
|
||||
BlueFormLabel,
|
||||
BlueSpacing10,
|
||||
BlueSpacing20,
|
||||
BlueFormLabel,
|
||||
BlueTextCentered,
|
||||
BlueBigCheckmark,
|
||||
BlueNavigationStyle,
|
||||
BlueButtonLink,
|
||||
SafeBlueArea,
|
||||
} from '../../BlueComponents';
|
||||
import BlueElectrum from '../../blue_modules/BlueElectrum';
|
||||
import Notifications from '../../blue_modules/notifications';
|
||||
@ -131,8 +132,7 @@ const Broadcast = () => {
|
||||
};
|
||||
|
||||
export default Broadcast;
|
||||
Broadcast.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
Broadcast.navigationOptions = navigationStyle({
|
||||
title: loc.send.create_broadcast,
|
||||
});
|
||||
|
||||
|
@ -18,7 +18,8 @@ import { useRoute, useTheme, useNavigation } from '@react-navigation/native';
|
||||
|
||||
import loc, { formatBalance } from '../../loc';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import { BlueNavigationStyle, SafeBlueArea, BlueSpacing10, BlueSpacing20, BlueButton, BlueListItem } from '../../BlueComponents';
|
||||
import { SafeBlueArea, BlueSpacing10, BlueSpacing20, BlueButton, BlueListItem } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import BottomModal from '../../components/BottomModal';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
@ -308,8 +309,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
CoinControl.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
CoinControl.navigationOptions = navigationStyle({
|
||||
title: loc.cc.header,
|
||||
});
|
||||
|
||||
|
@ -1,13 +1,15 @@
|
||||
/* global alert */
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ActivityIndicator, FlatList, TouchableOpacity, StyleSheet, Switch, View } from 'react-native';
|
||||
import { Text } from 'react-native-elements';
|
||||
import { PayjoinClient } from 'payjoin-client';
|
||||
import PayjoinTransaction from '../../class/payjoin-transaction';
|
||||
import { BlueButton, BlueText, SafeBlueArea, BlueCard, BlueSpacing40, BlueNavigationStyle } from '../../BlueComponents';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import PropTypes from 'prop-types';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
|
||||
import PayjoinTransaction from '../../class/payjoin-transaction';
|
||||
import { BlueButton, BlueText, SafeBlueArea, BlueCard, BlueSpacing40 } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import Biometric from '../../class/biometrics';
|
||||
import loc, { formatBalance, formatBalanceWithoutSuffix } from '../../loc';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
@ -324,7 +326,6 @@ Confirm.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
Confirm.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
Confirm.navigationOptions = navigationStyle({
|
||||
title: loc.send.confirm_header,
|
||||
});
|
||||
|
@ -20,13 +20,14 @@ import Clipboard from '@react-native-community/clipboard';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import Share from 'react-native-share';
|
||||
import RNFS from 'react-native-fs';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
|
||||
import { BlueNavigationStyle, SafeBlueArea, BlueCard, BlueText } from '../../BlueComponents';
|
||||
import { SafeBlueArea, BlueCard, BlueText } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import Privacy from '../../Privacy';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import loc from '../../loc';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
export default class SendCreate extends Component {
|
||||
@ -251,21 +252,25 @@ SendCreate.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
SendCreate.navigationOptions = ({ navigation, route }) => {
|
||||
let headerRight;
|
||||
if (route.params.exportTXN) {
|
||||
headerRight = () => (
|
||||
<TouchableOpacity style={styles.export} onPress={route.params.exportTXN}>
|
||||
<Icon size={22} name="share-alternative" type="entypo" color={BlueCurrentTheme.colors.foregroundColor} />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
} else {
|
||||
headerRight = null;
|
||||
}
|
||||
|
||||
return {
|
||||
...BlueNavigationStyle(),
|
||||
SendCreate.navigationOptions = navigationStyle(
|
||||
{
|
||||
title: loc.send.create_details,
|
||||
headerRight,
|
||||
};
|
||||
};
|
||||
},
|
||||
(options, { theme, navigation, route }) => {
|
||||
let headerRight;
|
||||
if (route.params.exportTXN) {
|
||||
headerRight = () => (
|
||||
<TouchableOpacity style={styles.export} onPress={route.params.exportTXN}>
|
||||
<Icon size={22} name="share-alternative" type="entypo" color={BlueCurrentTheme.colors.foregroundColor} />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
} else {
|
||||
headerRight = null;
|
||||
}
|
||||
|
||||
return {
|
||||
...options,
|
||||
headerRight,
|
||||
};
|
||||
},
|
||||
);
|
||||
|
@ -20,8 +20,12 @@ import {
|
||||
} from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import RNFS from 'react-native-fs';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as bitcoin from 'bitcoinjs-lib';
|
||||
|
||||
import {
|
||||
BlueCreateTxNavigationStyle,
|
||||
BlueButton,
|
||||
BlueBitcoinAmount,
|
||||
BlueAddressInput,
|
||||
@ -31,11 +35,7 @@ import {
|
||||
BlueListItem,
|
||||
BlueText,
|
||||
} from '../../BlueComponents';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import RNFS from 'react-native-fs';
|
||||
import * as bitcoin from 'bitcoinjs-lib';
|
||||
|
||||
import { navigationStyleTx } from '../../components/navigationStyle';
|
||||
import NetworkTransactionFees, { NetworkTransactionFee } from '../../models/networkTransactionFees';
|
||||
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
|
||||
import { HDSegwitBech32Wallet, LightningCustodianWallet, MultisigHDWallet, WatchOnlyWallet } from '../../class';
|
||||
@ -205,6 +205,11 @@ const styles = StyleSheet.create({
|
||||
feeValue: {
|
||||
color: BlueCurrentTheme.colors.feeValue,
|
||||
},
|
||||
advancedOptions: {
|
||||
minWidth: 40,
|
||||
height: 40,
|
||||
justifyContent: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
export default class SendDetails extends Component {
|
||||
@ -1470,7 +1475,28 @@ SendDetails.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
SendDetails.navigationOptions = ({ navigation, route }) => ({
|
||||
...BlueCreateTxNavigationStyle(navigation, route.params.withAdvancedOptionsMenuButton, route.params.advancedOptionsMenuButtonAction),
|
||||
title: loc.send.header,
|
||||
});
|
||||
SendDetails.navigationOptions = navigationStyleTx(
|
||||
{
|
||||
title: loc.send.header,
|
||||
},
|
||||
(options, { theme, navigation, route }) => {
|
||||
let headerRight;
|
||||
if (route.params.withAdvancedOptionsMenuButton) {
|
||||
headerRight = () => (
|
||||
<TouchableOpacity
|
||||
style={styles.advancedOptions}
|
||||
onPress={route.params.advancedOptionsMenuButtonAction}
|
||||
testID="advancedOptionsMenuButton"
|
||||
>
|
||||
<Icon size={22} name="kebab-horizontal" type="octicon" color={theme.colors.foregroundColor} />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
} else {
|
||||
headerRight = null;
|
||||
}
|
||||
return {
|
||||
...options,
|
||||
headerRight,
|
||||
};
|
||||
},
|
||||
);
|
||||
|
@ -1,18 +1,11 @@
|
||||
import React, { useState, useContext } from 'react';
|
||||
import { StyleSheet, View, KeyboardAvoidingView, Platform, TextInput, Keyboard } from 'react-native';
|
||||
import loc from '../../loc';
|
||||
import {
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueButton,
|
||||
BlueSpacing10,
|
||||
BlueSpacing20,
|
||||
BlueNavigationStyle,
|
||||
BlueText,
|
||||
BlueButtonLink,
|
||||
} from '../../BlueComponents';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { StyleSheet, View, KeyboardAvoidingView, Platform, TextInput, Keyboard } from 'react-native';
|
||||
|
||||
import loc from '../../loc';
|
||||
import { BlueButton, BlueButtonLink, BlueCard, BlueSpacing10, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { isMacCatalina } from '../../blue_modules/environment';
|
||||
const fs = require('../../blue_modules/fs');
|
||||
|
||||
@ -120,8 +113,7 @@ const IsItMyAddress = () => {
|
||||
};
|
||||
|
||||
export default IsItMyAddress;
|
||||
IsItMyAddress.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
IsItMyAddress.navigationOptions = navigationStyle({
|
||||
title: loc.is_it_my_address.title,
|
||||
});
|
||||
|
||||
|
@ -1,15 +1,17 @@
|
||||
/* global alert */
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { FlatList, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { BlueButton, BlueCard, BlueNavigationStyle, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import loc from '../../loc';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { BlueButton, BlueCard, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
const bitcoin = require('bitcoinjs-lib');
|
||||
const currency = require('../../blue_modules/currency');
|
||||
const BigNumber = require('bignumber.js');
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
const shortenAddress = addr => {
|
||||
return addr.substr(0, Math.floor(addr.length / 2) - 1) + '\n' + addr.substr(Math.floor(addr.length / 2) - 1, addr.length);
|
||||
@ -406,8 +408,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
PsbtMultisig.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
PsbtMultisig.navigationOptions = navigationStyle({
|
||||
title: loc.multisig.header,
|
||||
});
|
||||
|
||||
|
@ -1,15 +1,17 @@
|
||||
/* global alert */
|
||||
import React, { useState } from 'react';
|
||||
import { ActivityIndicator, ScrollView, StyleSheet, View } from 'react-native';
|
||||
import { BlueNavigationStyle, BlueSpacing20, SafeBlueArea } from '../../BlueComponents';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { BlueSpacing20, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { DynamicQRCode } from '../../components/DynamicQRCode';
|
||||
import { SquareButton } from '../../components/SquareButton';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import loc from '../../loc';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
const bitcoin = require('bitcoinjs-lib');
|
||||
|
||||
const fs = require('../../blue_modules/fs');
|
||||
|
||||
const isDesktop = getSystemName() === 'Mac OS X';
|
||||
|
||||
const PsbtMultisigQRCode = () => {
|
||||
@ -118,8 +120,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
PsbtMultisigQRCode.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
PsbtMultisigQRCode.navigationOptions = navigationStyle({
|
||||
title: loc.multisig.header,
|
||||
});
|
||||
|
||||
|
@ -14,26 +14,27 @@ import {
|
||||
Alert,
|
||||
} from 'react-native';
|
||||
import Clipboard from '@react-native-community/clipboard';
|
||||
import Share from 'react-native-share';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import DocumentPicker from 'react-native-document-picker';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
import RNFS from 'react-native-fs';
|
||||
|
||||
import {
|
||||
SecondButton,
|
||||
BlueText,
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing20,
|
||||
BlueCopyToClipboardButton,
|
||||
DynamicQRCode,
|
||||
} from '../../BlueComponents';
|
||||
import Share from 'react-native-share';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import RNFS from 'react-native-fs';
|
||||
import DocumentPicker from 'react-native-document-picker';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import Notifications from '../../blue_modules/notifications';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
const BlueElectrum = require('../../blue_modules/BlueElectrum');
|
||||
/** @type {AppStorage} */
|
||||
const bitcoin = require('bitcoinjs-lib');
|
||||
@ -319,8 +320,7 @@ const PsbtWithHardwareWallet = () => {
|
||||
|
||||
export default PsbtWithHardwareWallet;
|
||||
|
||||
PsbtWithHardwareWallet.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
PsbtWithHardwareWallet.navigationOptions = navigationStyle({
|
||||
title: loc.send.header,
|
||||
});
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { ScrollView, Platform, TouchableWithoutFeedback, TouchableOpacity, StyleSheet } from 'react-native';
|
||||
import { BlueLoading, BlueText, BlueSpacing20, BlueListItem, BlueNavigationStyle, BlueCard } from '../../BlueComponents';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueLoading, BlueText, BlueSpacing20, BlueListItem, BlueCard } from '../../BlueComponents';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
import HandoffSettings from '../../class/handoff';
|
||||
import loc from '../../loc';
|
||||
@ -88,8 +90,7 @@ const GeneralSettings = () => {
|
||||
);
|
||||
};
|
||||
|
||||
GeneralSettings.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
GeneralSettings.navigationOptions = navigationStyle({
|
||||
title: loc.settings.general,
|
||||
});
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React from 'react';
|
||||
import { ScrollView, StyleSheet } from 'react-native';
|
||||
import { SafeBlueArea, BlueListItem, BlueNavigationStyle } from '../../BlueComponents';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { SafeBlueArea, BlueListItem } from '../../BlueComponents';
|
||||
import loc from '../../loc';
|
||||
|
||||
const NetworkSettings = () => {
|
||||
@ -36,8 +38,9 @@ const NetworkSettings = () => {
|
||||
</SafeBlueArea>
|
||||
);
|
||||
};
|
||||
NetworkSettings.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
|
||||
NetworkSettings.navigationOptions = navigationStyle({
|
||||
title: loc.settings.network,
|
||||
});
|
||||
|
||||
export default NetworkSettings;
|
||||
|
@ -1,12 +1,13 @@
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { ScrollView, TouchableWithoutFeedback, StyleSheet, Linking, Platform } from 'react-native';
|
||||
import { BlueText, BlueSpacing20, BlueListItem, BlueNavigationStyle, BlueCard, BlueHeaderDefaultSub } from '../../BlueComponents';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import loc from '../../loc';
|
||||
import BlueClipboard from '../../blue_modules/clipboard';
|
||||
import DeviceQuickActions from '../../class/quick-actions';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueText, BlueSpacing20, BlueListItem, BlueCard, BlueHeaderDefaultSub } from '../../BlueComponents';
|
||||
import loc from '../../loc';
|
||||
import DeviceQuickActions from '../../class/quick-actions';
|
||||
import BlueClipboard from '../../blue_modules/clipboard';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import WidgetCommunication from '../../blue_modules/WidgetCommunication';
|
||||
|
||||
const SettingsPrivacy = () => {
|
||||
@ -135,8 +136,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
SettingsPrivacy.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
SettingsPrivacy.navigationOptions = navigationStyle({
|
||||
title: loc.settings.privacy,
|
||||
});
|
||||
|
||||
|
@ -1,18 +1,12 @@
|
||||
import React from 'react';
|
||||
import { TouchableOpacity, ScrollView, Linking, Image, View, Text, StyleSheet, useWindowDimensions } from 'react-native';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
import {
|
||||
BlueTextCentered,
|
||||
BlueSpacing20,
|
||||
BlueButton,
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueListItem,
|
||||
BlueNavigationStyle,
|
||||
} from '../../BlueComponents';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { getApplicationName, getVersion, getBundleId, getBuildNumber } from 'react-native-device-info';
|
||||
import Rate, { AndroidMarket } from 'react-native-rate';
|
||||
|
||||
import { BlueButton, BlueCard, BlueListItem, BlueSpacing20, BlueTextCentered, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
|
||||
const About = () => {
|
||||
@ -214,8 +208,7 @@ const About = () => {
|
||||
);
|
||||
};
|
||||
|
||||
About.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
About.navigationOptions = navigationStyle({
|
||||
headerTitle: loc.settings.about,
|
||||
});
|
||||
export default About;
|
||||
|
@ -1,10 +1,11 @@
|
||||
import React, { useState, useEffect, useContext } from 'react';
|
||||
import { FlatList, ActivityIndicator, View, StyleSheet } from 'react-native';
|
||||
import { SafeBlueArea, BlueListItem, BlueText, BlueCard, BlueNavigationStyle } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { SafeBlueArea, BlueListItem, BlueText, BlueCard } from '../../BlueComponents';
|
||||
import { FiatUnit, FiatUnitSource } from '../../models/fiatUnit';
|
||||
import loc from '../../loc';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
@ -85,15 +86,8 @@ const Currency = () => {
|
||||
);
|
||||
};
|
||||
|
||||
Currency.propTypes = {
|
||||
navigation: PropTypes.shape({
|
||||
navigate: PropTypes.func,
|
||||
goBack: PropTypes.func,
|
||||
}),
|
||||
};
|
||||
|
||||
Currency.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
Currency.navigationOptions = navigationStyle({
|
||||
title: loc.settings.currency,
|
||||
});
|
||||
|
||||
export default Currency;
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { View, TouchableWithoutFeedback, StyleSheet } from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { SafeBlueArea, BlueCard, BlueNavigationStyle, BlueListItem, BlueText } from '../../BlueComponents';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { SafeBlueArea, BlueCard, BlueListItem, BlueText } from '../../BlueComponents';
|
||||
import OnAppLaunch from '../../class/on-app-launch';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
@ -78,8 +80,7 @@ const DefaultView = () => {
|
||||
);
|
||||
};
|
||||
|
||||
DefaultView.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
DefaultView.navigationOptions = navigationStyle({
|
||||
title: loc.settings.default_title,
|
||||
});
|
||||
|
||||
|
@ -1,25 +1,18 @@
|
||||
/* global alert */
|
||||
import React, { Component } from 'react';
|
||||
import { Alert, View, TextInput, StyleSheet } from 'react-native';
|
||||
import { AppStorage } from '../../class';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { ScrollView } from 'react-native-gesture-handler';
|
||||
import {
|
||||
BlueLoading,
|
||||
BlueSpacing20,
|
||||
BlueButton,
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueText,
|
||||
BlueNavigationStyle,
|
||||
BlueButtonLink,
|
||||
} from '../../BlueComponents';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import PropTypes from 'prop-types';
|
||||
import loc from '../../loc';
|
||||
import { Alert, View, TextInput, StyleSheet } from 'react-native';
|
||||
import DefaultPreference from 'react-native-default-preference';
|
||||
import RNWidgetCenter from 'react-native-widget-center';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { ScrollView } from 'react-native-gesture-handler';
|
||||
|
||||
import loc from '../../loc';
|
||||
import { AppStorage } from '../../class';
|
||||
import DeeplinkSchemaMatch from '../../class/deeplink-schema-match';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueButton, BlueButtonLink, BlueCard, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
const BlueElectrum = require('../../blue_modules/BlueElectrum');
|
||||
|
||||
export default class ElectrumSettings extends Component {
|
||||
@ -247,8 +240,7 @@ ElectrumSettings.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
ElectrumSettings.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
ElectrumSettings.navigationOptions = navigationStyle({
|
||||
title: loc.settings.electrum_settings,
|
||||
});
|
||||
|
||||
|
@ -3,6 +3,9 @@ import React, { useEffect, useState, useCallback, useContext } from 'react';
|
||||
import { ScrollView, Alert, Platform, TouchableOpacity, TouchableWithoutFeedback, StyleSheet } from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { colors } from 'react-native-elements';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import {
|
||||
BlueLoading,
|
||||
SafeBlueArea,
|
||||
@ -11,11 +14,9 @@ import {
|
||||
BlueListItem,
|
||||
BlueHeaderDefaultSubHooks,
|
||||
BlueText,
|
||||
BlueNavigationStyle,
|
||||
} from '../../BlueComponents';
|
||||
import Biometric from '../../class/biometrics';
|
||||
import loc from '../../loc';
|
||||
import { colors } from 'react-native-elements';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
const prompt = require('../../blue_modules/prompt');
|
||||
|
||||
@ -202,7 +203,6 @@ const EncryptStorage = () => {
|
||||
};
|
||||
|
||||
export default EncryptStorage;
|
||||
EncryptStorage.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
EncryptStorage.navigationOptions = navigationStyle({
|
||||
headerTitle: loc.settings.encrypt_title,
|
||||
});
|
||||
|
@ -1,6 +1,8 @@
|
||||
import React, { useState, useEffect, useContext } from 'react';
|
||||
import { FlatList, StyleSheet } from 'react-native';
|
||||
import { SafeBlueArea, BlueListItem, BlueLoading, BlueNavigationStyle } from '../../BlueComponents';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { SafeBlueArea, BlueListItem, BlueLoading } from '../../BlueComponents';
|
||||
import { AvailableLanguages } from '../../loc/languages';
|
||||
import loc from '../../loc';
|
||||
|
||||
@ -62,8 +64,7 @@ const Language = () => {
|
||||
);
|
||||
};
|
||||
|
||||
Language.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
Language.navigationOptions = navigationStyle({
|
||||
headerTitle: loc.settings.language,
|
||||
});
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { ScrollView, StyleSheet } from 'react-native';
|
||||
import { SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, BlueSpacing20, BlueLoading } from '../../BlueComponents';
|
||||
/** @type {AppStorage} */
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { SafeBlueArea, BlueCard, BlueText, BlueSpacing20, BlueLoading } from '../../BlueComponents';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
@ -51,8 +51,7 @@ const Licensing = () => {
|
||||
);
|
||||
};
|
||||
|
||||
Licensing.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
Licensing.navigationOptions = navigationStyle({
|
||||
title: 'License',
|
||||
});
|
||||
|
||||
|
@ -3,18 +3,11 @@ import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { View, TextInput, Linking, StyleSheet, Alert } from 'react-native';
|
||||
import { Button } from 'react-native-elements';
|
||||
import { useTheme, useNavigation, useRoute } from '@react-navigation/native';
|
||||
import { AppStorage } from '../../class';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import {
|
||||
BlueSpacing20,
|
||||
BlueButton,
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueNavigationStyle,
|
||||
BlueLoading,
|
||||
BlueText,
|
||||
BlueButtonLink,
|
||||
} from '../../BlueComponents';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueButton, BlueButtonLink, BlueCard, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import { AppStorage } from '../../class';
|
||||
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
|
||||
import loc from '../../loc';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
@ -160,8 +153,8 @@ const LightningSettings = () => {
|
||||
);
|
||||
};
|
||||
|
||||
LightningSettings.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
LightningSettings.navigationOptions = navigationStyle({
|
||||
title: loc.settings.lightning_settings,
|
||||
});
|
||||
|
||||
export default LightningSettings;
|
||||
|
@ -1,19 +1,12 @@
|
||||
/* global alert */
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { ScrollView, TouchableWithoutFeedback, StyleSheet, Linking, View, TextInput } from 'react-native';
|
||||
import {
|
||||
BlueLoading,
|
||||
BlueText,
|
||||
BlueSpacing20,
|
||||
BlueListItem,
|
||||
BlueNavigationStyle,
|
||||
BlueCard,
|
||||
BlueButton,
|
||||
BlueCopyToClipboardButton,
|
||||
} from '../../BlueComponents';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import loc from '../../loc';
|
||||
import { Button } from 'react-native-elements';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueButton, BlueCard, BlueCopyToClipboardButton, BlueListItem, BlueLoading, BlueSpacing20, BlueText } from '../../BlueComponents';
|
||||
import loc from '../../loc';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import Notifications from '../../blue_modules/notifications';
|
||||
|
||||
@ -163,8 +156,7 @@ const NotificationSettings = () => {
|
||||
);
|
||||
};
|
||||
|
||||
NotificationSettings.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
NotificationSettings.navigationOptions = navigationStyle({
|
||||
title: loc.settings.notifications,
|
||||
});
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
import { ScrollView, StyleSheet } from 'react-native';
|
||||
import { SafeBlueArea, BlueCard, BlueNavigationStyle, BlueText } from '../../BlueComponents';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { SafeBlueArea, BlueCard, BlueText } from '../../BlueComponents';
|
||||
import loc from '../../loc';
|
||||
|
||||
const ReleaseNotes = () => {
|
||||
@ -25,8 +26,7 @@ const ReleaseNotes = () => {
|
||||
);
|
||||
};
|
||||
|
||||
ReleaseNotes.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
ReleaseNotes.navigationOptions = navigationStyle({
|
||||
title: loc.settings.about_release_notes,
|
||||
});
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React, { useContext } from 'react';
|
||||
import { ScrollView, StyleSheet, StatusBar } from 'react-native';
|
||||
import { BlueListItem, BlueNavigationStyle, BlueHeaderDefaultSubHooks } from '../../BlueComponents';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueListItem, BlueHeaderDefaultSubHooks } from '../../BlueComponents';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
@ -34,7 +36,6 @@ const Settings = () => {
|
||||
};
|
||||
|
||||
export default Settings;
|
||||
Settings.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
Settings.navigationOptions = navigationStyle({
|
||||
headerTitle: '',
|
||||
});
|
||||
|
@ -5,16 +5,9 @@ import { ActivityIndicator, View, TextInput, TouchableOpacity, Linking, ScrollVi
|
||||
import Clipboard from '@react-native-community/clipboard';
|
||||
import { Text } from 'react-native-elements';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import {
|
||||
BlueSpacing20,
|
||||
BlueReplaceFeeSuggestions,
|
||||
BlueButton,
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueText,
|
||||
BlueSpacing,
|
||||
BlueNavigationStyle,
|
||||
} from '../../BlueComponents';
|
||||
|
||||
import { BlueButton, BlueCard, BlueReplaceFeeSuggestions, BlueSpacing, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet } from '../../class';
|
||||
import loc from '../../loc';
|
||||
@ -250,7 +243,6 @@ CPFP.propTypes = {
|
||||
}),
|
||||
}),
|
||||
};
|
||||
CPFP.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
CPFP.navigationOptions = navigationStyle({
|
||||
title: loc.transactions.cpfp_title,
|
||||
});
|
||||
|
@ -2,7 +2,8 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ActivityIndicator, View, ScrollView, StyleSheet } from 'react-native';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText, BlueNavigationStyle } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText } from '../../BlueComponents';
|
||||
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet } from '../../class';
|
||||
import CPFP from './CPFP';
|
||||
import loc from '../../loc';
|
||||
@ -116,8 +117,6 @@ RBFBumpFee.propTypes = {
|
||||
}),
|
||||
}),
|
||||
};
|
||||
|
||||
RBFBumpFee.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
RBFBumpFee.navigationOptions = navigationStyle({
|
||||
title: loc.transactions.rbf_title,
|
||||
});
|
||||
|
@ -1,8 +1,9 @@
|
||||
/* global alert */
|
||||
import React from 'react';
|
||||
import { ActivityIndicator, View, StyleSheet, ScrollView } from 'react-native';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText, BlueNavigationStyle } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ActivityIndicator, View, StyleSheet, ScrollView } from 'react-native';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet } from '../../class';
|
||||
import CPFP from './CPFP';
|
||||
import loc from '../../loc';
|
||||
@ -127,7 +128,6 @@ RBFCancel.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
RBFCancel.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
RBFCancel.navigationOptions = navigationStyle({
|
||||
title: loc.transactions.cancel_title,
|
||||
});
|
||||
|
@ -1,20 +1,13 @@
|
||||
/* global alert */
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { View, ScrollView, TouchableOpacity, Text, TextInput, Linking, StatusBar, StyleSheet, Keyboard } from 'react-native';
|
||||
import {
|
||||
SafeBlueArea,
|
||||
BlueCard,
|
||||
BlueText,
|
||||
BlueLoading,
|
||||
BlueSpacing20,
|
||||
BlueCopyToClipboardButton,
|
||||
BlueNavigationStyle,
|
||||
} from '../../BlueComponents';
|
||||
import HandoffSettings from '../../class/handoff';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import Handoff from 'react-native-handoff';
|
||||
import { BlueCard, BlueCopyToClipboardButton, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import HandoffSettings from '../../class/handoff';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
const dayjs = require('dayjs');
|
||||
|
||||
function onlyUnique(value, index, self) {
|
||||
@ -287,7 +280,6 @@ const styles = StyleSheet.create({
|
||||
|
||||
export default TransactionsDetails;
|
||||
|
||||
TransactionsDetails.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
TransactionsDetails.navigationOptions = navigationStyle({
|
||||
title: loc.transactions.details_title,
|
||||
});
|
||||
|
@ -1,26 +1,28 @@
|
||||
import React, { useContext, useEffect, useRef, useState } from 'react';
|
||||
import { View, ActivityIndicator, Text, TouchableOpacity, StyleSheet, StatusBar } from 'react-native';
|
||||
import {
|
||||
BlueButton,
|
||||
SafeBlueArea,
|
||||
BlueTransactionOutgoingIcon,
|
||||
BlueTransactionPendingIcon,
|
||||
BlueTransactionIncomingIcon,
|
||||
BlueCard,
|
||||
BlueText,
|
||||
BlueLoading,
|
||||
BlueSpacing20,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing10,
|
||||
} from '../../BlueComponents';
|
||||
import { HDSegwitBech32Transaction } from '../../class';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import Handoff from 'react-native-handoff';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import {
|
||||
BlueButton,
|
||||
BlueCard,
|
||||
BlueLoading,
|
||||
BlueSpacing10,
|
||||
BlueSpacing20,
|
||||
BlueText,
|
||||
BlueTransactionIncomingIcon,
|
||||
BlueTransactionOutgoingIcon,
|
||||
BlueTransactionPendingIcon,
|
||||
SafeBlueArea,
|
||||
} from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { HDSegwitBech32Transaction } from '../../class';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import HandoffSettings from '../../class/handoff';
|
||||
import loc, { formatBalanceWithoutSuffix } from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
const buttonStatus = Object.freeze({
|
||||
possible: 1,
|
||||
unknown: 2,
|
||||
@ -458,7 +460,6 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
TransactionsStatus.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
TransactionsStatus.navigationOptions = navigationStyle({
|
||||
title: '',
|
||||
});
|
||||
|
@ -21,10 +21,10 @@ import {
|
||||
VaultButton,
|
||||
BlueFormLabel,
|
||||
BlueButton,
|
||||
BlueNavigationStyle,
|
||||
BlueButtonLink,
|
||||
BlueSpacing20,
|
||||
} from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { HDSegwitBech32Wallet, SegwitP2SHWallet, HDSegwitP2SHWallet, LightningCustodianWallet, AppStorage } from '../../class';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { useTheme, useNavigation } from '@react-navigation/native';
|
||||
@ -331,8 +331,8 @@ const WalletsAdd = () => {
|
||||
);
|
||||
};
|
||||
|
||||
WalletsAdd.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
WalletsAdd.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
headerTitle: loc.wallets.add_title,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -5,7 +5,8 @@ import { Icon } from 'react-native-elements';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
import { BlueButton, BlueListItem, BlueNavigationStyle, BlueSpacing20 } from '../../BlueComponents';
|
||||
import { BlueButton, BlueListItem, BlueSpacing20 } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import BottomModal from '../../components/BottomModal';
|
||||
import { MultisigHDWallet } from '../../class';
|
||||
import loc from '../../loc';
|
||||
@ -346,8 +347,7 @@ WalletsAddMultisig.getCurrentFormatReadable = f => {
|
||||
}
|
||||
};
|
||||
|
||||
WalletsAddMultisig.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
WalletsAddMultisig.navigationOptions = navigationStyle({
|
||||
headerTitle: null,
|
||||
});
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Image, View, Text, ScrollView, StyleSheet } from 'react-native';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import { SafeBlueArea, BlueNavigationStyle, BlueLoading } from '../../BlueComponents';
|
||||
import { SafeBlueArea, BlueLoading } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
/** @type {AppStorage} */
|
||||
import loc from '../../loc';
|
||||
|
||||
@ -119,8 +120,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
WalletsAddMultisigHelp.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
WalletsAddMultisigHelp.navigationOptions = navigationStyle({
|
||||
title: '',
|
||||
gestureEnabled: false,
|
||||
swipeEnabled: false,
|
||||
|
@ -13,33 +13,34 @@ import {
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import Clipboard from '@react-native-community/clipboard';
|
||||
import showPopupMenu from 'react-native-popup-menu-android';
|
||||
import ToolTip from 'react-native-tooltip';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
|
||||
import {
|
||||
BlueButton,
|
||||
BlueButtonLink,
|
||||
BlueFormMultiInput,
|
||||
BlueLoading,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing10,
|
||||
BlueSpacing20,
|
||||
BlueSpacing40,
|
||||
BlueTextCentered,
|
||||
} from '../../BlueComponents';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { HDSegwitBech32Wallet, MultisigCosigner, MultisigHDWallet } from '../../class';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import loc from '../../loc';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import { SquareButton } from '../../components/SquareButton';
|
||||
import BottomModal from '../../components/BottomModal';
|
||||
import MultipleStepsListItem, {
|
||||
MultipleStepsListItemButtohType,
|
||||
MultipleStepsListItemDashType,
|
||||
} from '../../components/MultipleStepsListItem';
|
||||
import Clipboard from '@react-native-community/clipboard';
|
||||
import showPopupMenu from 'react-native-popup-menu-android';
|
||||
import ToolTip from 'react-native-tooltip';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
const prompt = require('../../blue_modules/prompt');
|
||||
@ -791,8 +792,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
WalletsAddMultisigStep2.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
WalletsAddMultisigStep2.navigationOptions = navigationStyle({
|
||||
headerTitle: null,
|
||||
gestureEnabled: false,
|
||||
swipeEnabled: false,
|
||||
|
@ -1,13 +1,16 @@
|
||||
import React, { Component } from 'react';
|
||||
import { StyleSheet, StatusBar, Linking, Platform } from 'react-native';
|
||||
import { BlueNavigationStyle, BlueLoading, SafeBlueArea } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { StyleSheet, StatusBar, Linking, Platform } from 'react-native';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { LightningCustodianWallet, WatchOnlyWallet } from '../../class';
|
||||
import InAppBrowser from 'react-native-inappbrowser-reborn';
|
||||
|
||||
import { BlueLoading, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { LightningCustodianWallet, WatchOnlyWallet } from '../../class';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
const currency = require('../../blue_modules/currency');
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
flex: 1,
|
||||
@ -105,8 +108,8 @@ BuyBitcoin.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
BuyBitcoin.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
BuyBitcoin.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: '',
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -16,7 +16,8 @@ import {
|
||||
StatusBar,
|
||||
PermissionsAndroid,
|
||||
} from 'react-native';
|
||||
import { SecondButton, SafeBlueArea, BlueCard, BlueSpacing20, BlueNavigationStyle, BlueText, BlueLoading } from '../../BlueComponents';
|
||||
import { SecondButton, SafeBlueArea, BlueCard, BlueSpacing20, BlueText, BlueLoading } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
|
||||
import { HDLegacyBreadwalletWallet } from '../../class/wallets/hd-legacy-breadwallet-wallet';
|
||||
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
|
||||
@ -542,8 +543,7 @@ const WalletDetails = () => {
|
||||
);
|
||||
};
|
||||
|
||||
WalletDetails.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
WalletDetails.navigationOptions = navigationStyle({
|
||||
headerTitle: loc.wallets.details_title,
|
||||
});
|
||||
|
||||
|
@ -1,18 +1,16 @@
|
||||
import React, { useContext, useEffect, useRef, useState } from 'react';
|
||||
import { StatusBar, View, TouchableOpacity, StyleSheet, Alert, useWindowDimensions } from 'react-native';
|
||||
import { StatusBar, View, StyleSheet, Alert, useWindowDimensions } from 'react-native';
|
||||
import { DrawerContentScrollView } from '@react-navigation/drawer';
|
||||
import { BlueNavigationStyle, BlueHeaderDefaultMain } from '../../BlueComponents';
|
||||
import WalletsCarousel from '../../components/WalletsCarousel';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import PropTypes from 'prop-types';
|
||||
import { PlaceholderWallet } from '../../class';
|
||||
import WalletImport from '../../class/wallet-import';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
import loc from '../../loc';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
import { BlueHeaderDefaultMain } from '../../BlueComponents';
|
||||
import WalletsCarousel from '../../components/WalletsCarousel';
|
||||
import { PlaceholderWallet } from '../../class';
|
||||
import WalletImport from '../../class/wallet-import';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
const DrawerList = props => {
|
||||
@ -131,6 +129,7 @@ const DrawerList = props => {
|
||||
};
|
||||
|
||||
export default DrawerList;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
contentContainerCustomStyle: {
|
||||
paddingRight: 10,
|
||||
@ -157,22 +156,3 @@ DrawerList.propTypes = {
|
||||
params: PropTypes.object,
|
||||
}),
|
||||
};
|
||||
|
||||
DrawerList.navigationOptions = ({ navigation }) => {
|
||||
return {
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
title: '',
|
||||
headerStyle: {
|
||||
backgroundColor: BlueCurrentTheme.colors.customHeader,
|
||||
borderBottomWidth: 0,
|
||||
elevation: 0,
|
||||
shadowOpacity: 0,
|
||||
shadowOffset: { height: 0, width: 0 },
|
||||
},
|
||||
headerRight: () => (
|
||||
<TouchableOpacity testID="SettingsButton" style={styles.headerTouch} onPress={() => NavigationService.navigate('Settings')}>
|
||||
<Icon size={22} name="kebab-horizontal" type="octicon" color={BlueCurrentTheme.colors.foregroundColor} />
|
||||
</TouchableOpacity>
|
||||
),
|
||||
};
|
||||
};
|
||||
|
@ -1,12 +1,14 @@
|
||||
import React, { useState, useCallback, useContext, useRef } from 'react';
|
||||
import { useWindowDimensions, InteractionManager, ScrollView, ActivityIndicator, StatusBar, View, StyleSheet } from 'react-native';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueNavigationStyle, BlueText, BlueCopyTextToClipboard, BlueCard } from '../../BlueComponents';
|
||||
import { useTheme, useNavigation, useFocusEffect, useRoute } from '@react-navigation/native';
|
||||
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText, BlueCopyTextToClipboard, BlueCard } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import Privacy from '../../Privacy';
|
||||
import Biometric from '../../class/biometrics';
|
||||
import { LegacyWallet, LightningCustodianWallet, SegwitBech32Wallet, SegwitP2SHWallet, WatchOnlyWallet } from '../../class';
|
||||
import loc from '../../loc';
|
||||
import { useTheme, useNavigation, useFocusEffect, useRoute } from '@react-navigation/native';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
@ -130,8 +132,8 @@ const WalletExport = () => {
|
||||
);
|
||||
};
|
||||
|
||||
WalletExport.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
WalletExport.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.wallets.export_title,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -1,11 +1,13 @@
|
||||
import React, { useCallback, useContext, useRef, useState } from 'react';
|
||||
import { ActivityIndicator, InteractionManager, ScrollView, StatusBar, StyleSheet, View } from 'react-native';
|
||||
import { BlueNavigationStyle, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { DynamicQRCode } from '../../components/DynamicQRCode';
|
||||
import Privacy from '../../Privacy';
|
||||
import Biometric from '../../class/biometrics';
|
||||
import loc from '../../loc';
|
||||
import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { SquareButton } from '../../components/SquareButton';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
const fs = require('../../blue_modules/fs');
|
||||
@ -125,8 +127,8 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
ExportMultisigCoordinationSetup.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
ExportMultisigCoordinationSetup.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.multisig.export_coordination_setup,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -22,7 +22,8 @@ import {
|
||||
} from 'react-native';
|
||||
import Geolocation from '@react-native-community/geolocation';
|
||||
|
||||
import { BlueButtonLink, BlueNavigationStyle, SafeBlueArea } from '../../BlueComponents';
|
||||
import { BlueButtonLink, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { HodlHodlApi } from '../../class/hodl-hodl-api';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
@ -881,21 +882,25 @@ HodlHodl.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
HodlHodl.navigationOptions = ({ navigation, route }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
title: '',
|
||||
headerStyle: {
|
||||
...BlueNavigationStyle(navigation, true).headerStyle,
|
||||
backgroundColor: BlueCurrentTheme.colors.customHeader,
|
||||
HodlHodl.navigationOptions = navigationStyle(
|
||||
{
|
||||
title: '',
|
||||
},
|
||||
headerRight: () => {
|
||||
return route.params.displayLoginButton ? (
|
||||
<BlueButtonLink title={loc.hodl.login} onPress={route.params.handleLoginPress} style={styles.marginHorizontal20} />
|
||||
) : (
|
||||
<BlueButtonLink title={loc.hodl.mycont} onPress={route.params.handleMyContractsPress} style={styles.marginHorizontal20} />
|
||||
);
|
||||
},
|
||||
});
|
||||
(options, { theme, navigation, route }) => ({
|
||||
...options,
|
||||
headerStyle: {
|
||||
...options.headerStyle,
|
||||
backgroundColor: theme.colors.customHeader,
|
||||
},
|
||||
headerRight: () => {
|
||||
return route.params.displayLoginButton ? (
|
||||
<BlueButtonLink title={loc.hodl.login} onPress={route.params.handleLoginPress} style={styles.marginHorizontal20} />
|
||||
) : (
|
||||
<BlueButtonLink title={loc.hodl.mycont} onPress={route.params.handleMyContractsPress} style={styles.marginHorizontal20} />
|
||||
);
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
grayDropdownText: {
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React, { useRef } from 'react';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { BlueNavigationStyle, SafeBlueArea } from '../../BlueComponents';
|
||||
import { useRoute, useNavigation } from '@react-navigation/native';
|
||||
|
||||
import { SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
|
||||
const url = 'https://accounts.hodlhodl.com/accounts/request_access?attributes=api_key,api_signature_key';
|
||||
@ -51,8 +53,8 @@ const HodlHodlLogin = () => {
|
||||
);
|
||||
};
|
||||
|
||||
HodlHodlLogin.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
HodlHodlLogin.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.hodl.login,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* global alert */
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
Alert,
|
||||
FlatList,
|
||||
@ -14,15 +15,8 @@ import {
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
import {
|
||||
BlueButton,
|
||||
BlueCopyTextToClipboard,
|
||||
BlueLoading,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing10,
|
||||
BlueSpacing20,
|
||||
BlueText,
|
||||
} from '../../BlueComponents';
|
||||
import { BlueButton, BlueCopyTextToClipboard, BlueLoading, BlueSpacing10, BlueSpacing20, BlueText } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { HodlHodlApi } from '../../class/hodl-hodl-api';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
@ -35,6 +29,7 @@ export default class HodlHodlMyContracts extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
props.navigation.setParams({ handleLogout: this.handleLogout });
|
||||
this.state = {
|
||||
contracts: [],
|
||||
isLoading: true,
|
||||
@ -45,6 +40,11 @@ export default class HodlHodlMyContracts extends Component {
|
||||
clearInterval(this.state.inverval);
|
||||
}
|
||||
|
||||
handleLogout = () => {
|
||||
this.context.setHodlHodlApiKey('', '<empty>');
|
||||
this.props.navigation.navigate('WalletsList');
|
||||
};
|
||||
|
||||
async componentDidMount() {
|
||||
const hodlApiKey = await this.context.getHodlHodlApiKey();
|
||||
const hodlApi = new HodlHodlApi(hodlApiKey);
|
||||
@ -424,35 +424,44 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
HodlHodlMyContracts.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
title: loc.hodl.cont_title,
|
||||
headerStyle: {
|
||||
backgroundColor: BlueCurrentTheme.colors.elevated,
|
||||
HodlHodlMyContracts.propTypes = {
|
||||
navigation: PropTypes.shape({
|
||||
navigate: PropTypes.func,
|
||||
setParams: PropTypes.func,
|
||||
}),
|
||||
};
|
||||
|
||||
HodlHodlMyContracts.navigationOptions = navigationStyle(
|
||||
{
|
||||
closeButton: true,
|
||||
title: loc.hodl.cont_title,
|
||||
},
|
||||
headerRight: () => (
|
||||
<TouchableOpacity
|
||||
style={styles.marginRight}
|
||||
onPress={() => {
|
||||
Alert.alert(
|
||||
loc.hodl.are_you_sure_you_want_to_logout,
|
||||
'',
|
||||
[
|
||||
{
|
||||
text: loc._.ok,
|
||||
onPress: () => {
|
||||
this.context.setHodlHodlApiKey('', '<empty>');
|
||||
navigation.navigate('WalletsList');
|
||||
(options, { theme, navigation, route }) => ({
|
||||
...options,
|
||||
headerStyle: {
|
||||
backgroundColor: theme.colors.elevated,
|
||||
},
|
||||
headerRight: () => (
|
||||
<TouchableOpacity
|
||||
style={styles.marginRight}
|
||||
onPress={() => {
|
||||
Alert.alert(
|
||||
loc.hodl.are_you_sure_you_want_to_logout,
|
||||
'',
|
||||
[
|
||||
{
|
||||
text: loc._.ok,
|
||||
onPress: route.params.handleLogout,
|
||||
style: 'default',
|
||||
},
|
||||
style: 'default',
|
||||
},
|
||||
{ text: loc._.cancel, onPress: () => {}, style: 'cancel' },
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
}}
|
||||
>
|
||||
<BlueText>logout</BlueText>
|
||||
</TouchableOpacity>
|
||||
),
|
||||
});
|
||||
{ text: loc._.cancel, onPress: () => {}, style: 'cancel' },
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
}}
|
||||
>
|
||||
<BlueText>{loc.hodl.logout}</BlueText>
|
||||
</TouchableOpacity>
|
||||
),
|
||||
}),
|
||||
);
|
||||
|
@ -1,10 +1,12 @@
|
||||
/* global alert */
|
||||
import React, { Component } from 'react';
|
||||
import { Alert, FlatList, Image, KeyboardAvoidingView, Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
|
||||
import { BlueButton, BlueLoading, BlueNavigationStyle, BlueSpacing10, SafeBlueArea } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { HodlHodlApi } from '../../class/hodl-hodl-api';
|
||||
import { Icon } from 'react-native-elements';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueButton, BlueLoading, BlueSpacing10, SafeBlueArea } from '../../BlueComponents';
|
||||
import { HodlHodlApi } from '../../class/hodl-hodl-api';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import loc from '../../loc';
|
||||
@ -380,11 +382,15 @@ const styles = StyleSheet.create({
|
||||
acceptOfferButtonWrapperWrapper: { marginTop: 24, alignItems: 'center' },
|
||||
});
|
||||
|
||||
HodlHodlViewOffer.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
title: '',
|
||||
headerStyle: {
|
||||
...BlueNavigationStyle().headerStyle,
|
||||
backgroundColor: BlueCurrentTheme.colors.customHeader,
|
||||
HodlHodlViewOffer.navigationOptions = navigationStyle(
|
||||
{
|
||||
title: '',
|
||||
},
|
||||
});
|
||||
(options, { theme }) => ({
|
||||
...options,
|
||||
headerStyle: {
|
||||
...options.headerStyle,
|
||||
backgroundColor: theme.colors.customHeader,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
@ -1,9 +1,10 @@
|
||||
import React from 'react';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { BlueNavigationStyle, SafeBlueArea } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useRoute } from '@react-navigation/native';
|
||||
|
||||
import { SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
|
||||
const HodlHodlWebview = () => {
|
||||
const { uri } = useRoute().params;
|
||||
|
||||
@ -14,18 +15,10 @@ const HodlHodlWebview = () => {
|
||||
);
|
||||
};
|
||||
|
||||
HodlHodlWebview.propTypes = {
|
||||
route: PropTypes.shape({
|
||||
params: PropTypes.shape({
|
||||
uri: PropTypes.string.isRequired,
|
||||
}),
|
||||
}),
|
||||
};
|
||||
|
||||
export default HodlHodlWebview;
|
||||
|
||||
HodlHodlWebview.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
HodlHodlWebview.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: '',
|
||||
headerLeft: null,
|
||||
});
|
||||
|
||||
export default HodlHodlWebview;
|
||||
|
@ -1,6 +1,10 @@
|
||||
/* global alert */
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Platform, View, Keyboard, StatusBar, StyleSheet } from 'react-native';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
|
||||
import {
|
||||
BlueFormMultiInput,
|
||||
BlueButtonLink,
|
||||
@ -9,14 +13,11 @@ import {
|
||||
BlueButton,
|
||||
SafeBlueArea,
|
||||
BlueSpacing20,
|
||||
BlueNavigationStyle,
|
||||
} from '../../BlueComponents';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import Privacy from '../../Privacy';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import WalletImport from '../../class/wallet-import';
|
||||
import loc from '../../loc';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
const isDesktop = getSystemName() === 'Mac OS X';
|
||||
const fs = require('../../blue_modules/fs');
|
||||
|
||||
@ -165,8 +166,7 @@ const WalletsImport = () => {
|
||||
);
|
||||
};
|
||||
|
||||
WalletsImport.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
WalletsImport.navigationOptions = navigationStyle({
|
||||
title: loc.wallets.import_title,
|
||||
});
|
||||
export default WalletsImport;
|
||||
|
@ -1,8 +1,10 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { BackHandler } from 'react-native';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { BlueLoading, BlueNavigationStyle } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { BlueLoading } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
|
||||
export default class Marketplace extends Component {
|
||||
webview = React.createRef();
|
||||
@ -75,8 +77,8 @@ Marketplace.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
Marketplace.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
Marketplace.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: 'Marketplace',
|
||||
headerLeft: null,
|
||||
});
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React, { useEffect, useState, useCallback, useContext } from 'react';
|
||||
import { ActivityIndicator, View, BackHandler, Text, ScrollView, StyleSheet, StatusBar } from 'react-native';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueNavigationStyle, BlueText, BlueButton } from '../../BlueComponents';
|
||||
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText, BlueButton } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import Privacy from '../../Privacy';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
@ -85,14 +87,15 @@ const PleaseBackup = () => {
|
||||
);
|
||||
};
|
||||
|
||||
PleaseBackup.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
PleaseBackup.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.pleasebackup.title,
|
||||
headerLeft: null,
|
||||
headerRight: null,
|
||||
gestureEnabled: false,
|
||||
swipeEnabled: false,
|
||||
});
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
flex: {
|
||||
flex: 1,
|
||||
|
@ -1,17 +1,12 @@
|
||||
import React, { useCallback, useContext, useEffect } from 'react';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { View, useWindowDimensions, StyleSheet, BackHandler, StatusBar } from 'react-native';
|
||||
import {
|
||||
SafeBlueArea,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing20,
|
||||
BlueCopyTextToClipboard,
|
||||
BlueButton,
|
||||
BlueTextCentered,
|
||||
} from '../../BlueComponents';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import Privacy from '../../Privacy';
|
||||
import { ScrollView } from 'react-native-gesture-handler';
|
||||
|
||||
import { BlueButton, BlueCopyTextToClipboard, BlueSpacing20, BlueTextCentered, SafeBlueArea } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import Privacy from '../../Privacy';
|
||||
import loc from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
@ -80,8 +75,8 @@ const PleaseBackupLNDHub = () => {
|
||||
);
|
||||
};
|
||||
|
||||
PleaseBackupLNDHub.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
PleaseBackupLNDHub.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.pleasebackup.title,
|
||||
headerLeft: null,
|
||||
headerRight: null,
|
||||
|
@ -3,11 +3,12 @@ import PropTypes from 'prop-types';
|
||||
import BN from 'bignumber.js';
|
||||
import { Dimensions, PixelRatio, View, ScrollView, Text, Image, TouchableOpacity, StyleSheet, useWindowDimensions } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import { FContainer, FButton } from '../../components/FloatButtons';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueNavigationStyle, BlueTabs } from '../../BlueComponents';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueTabs } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
|
||||
const ENTROPY_LIMIT = 256;
|
||||
@ -270,15 +271,7 @@ const Entropy = () => {
|
||||
);
|
||||
};
|
||||
|
||||
Entropy.propTypes = {
|
||||
navigation: PropTypes.shape({
|
||||
navigate: PropTypes.func,
|
||||
goBack: PropTypes.func,
|
||||
}),
|
||||
};
|
||||
|
||||
Entropy.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(),
|
||||
Entropy.navigationOptions = navigationStyle({
|
||||
title: loc.entropy.title,
|
||||
});
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
import React, { useEffect, useState, useRef, useContext } from 'react';
|
||||
import { View, ActivityIndicator, Image, Text, StyleSheet, StatusBar, ScrollView } from 'react-native';
|
||||
import { BlueNavigationStyle } from '../../BlueComponents';
|
||||
import SortableList from 'react-native-sortable-list';
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
import { PlaceholderWallet, LightningCustodianWallet, MultisigHDWallet } from '../../class';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { PlaceholderWallet, LightningCustodianWallet, MultisigHDWallet } from '../../class';
|
||||
import WalletGradient from '../../class/wallet-gradient';
|
||||
import loc, { formatBalance, transactionTimeToReadable } from '../../loc';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
@ -187,13 +188,14 @@ const ReorderWallets = () => {
|
||||
);
|
||||
};
|
||||
|
||||
ReorderWallets.navigationOptions = ({ navigation, route }) => ({
|
||||
...BlueNavigationStyle(
|
||||
navigation,
|
||||
true,
|
||||
route.params && route.params.customCloseButtonFunction ? route.params.customCloseButtonFunction : undefined,
|
||||
),
|
||||
headerTitle: loc.wallets.reorder_title,
|
||||
ReorderWallets.navigationOptions = navigationStyle({
|
||||
title: loc.wallets.reorder_title,
|
||||
closeButton: true,
|
||||
closeButtonFunc: ({ navigation, route }) => {
|
||||
if (route.params && route.params.customCloseButtonFunction) {
|
||||
route.params.customCloseButtonFunction();
|
||||
}
|
||||
},
|
||||
headerLeft: null,
|
||||
});
|
||||
|
||||
|
@ -1,12 +1,14 @@
|
||||
/* eslint-disable react/prop-types */
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { View, ActivityIndicator, Image, Text, TouchableOpacity, FlatList, StyleSheet, StatusBar } from 'react-native';
|
||||
import { SafeBlueArea, BlueText, BlueSpacing20, BluePrivateBalance, BlueNavigationStyle } from '../../BlueComponents';
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import WalletGradient from '../../class/wallet-gradient';
|
||||
import { useRoute, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { SafeBlueArea, BlueText, BlueSpacing20, BluePrivateBalance } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
|
||||
import WalletGradient from '../../class/wallet-gradient';
|
||||
import loc, { formatBalance, transactionTimeToReadable } from '../../loc';
|
||||
import { MultisigHDWallet } from '../../class';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
@ -170,11 +172,8 @@ const SelectWallet = ({ navigation }) => {
|
||||
}
|
||||
};
|
||||
|
||||
SelectWallet.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
headerRight: null,
|
||||
headerTitle: loc.wallets.select_wallet,
|
||||
headerBackTitleVisible: false,
|
||||
SelectWallet.navigationOptions = navigationStyle({
|
||||
title: loc.wallets.select_wallet,
|
||||
});
|
||||
|
||||
export default SelectWallet;
|
||||
|
@ -23,15 +23,17 @@ import Clipboard from '@react-native-community/clipboard';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import Handoff from 'react-native-handoff';
|
||||
import { useRoute, useNavigation, useTheme, useFocusEffect } from '@react-navigation/native';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
|
||||
import { Chain } from '../../models/bitcoinUnits';
|
||||
import { BlueTransactionListItem, BlueWalletNavigationHeader, BlueAlertWalletExportReminder, BlueListItem } from '../../BlueComponents';
|
||||
import WalletGradient from '../../class/wallet-gradient';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { LightningCustodianWallet, MultisigHDWallet, WatchOnlyWallet } from '../../class';
|
||||
import HandoffSettings from '../../class/handoff';
|
||||
import ActionSheet from '../ActionSheet';
|
||||
import loc from '../../loc';
|
||||
import { FContainer, FButton } from '../../components/FloatButtons';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
import BottomModal from '../../components/BottomModal';
|
||||
import BuyBitcoin from './buyBitcoin';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
@ -712,7 +714,7 @@ const WalletTransactions = () => {
|
||||
|
||||
export default WalletTransactions;
|
||||
|
||||
WalletTransactions.navigationOptions = ({ navigation, route }) => {
|
||||
WalletTransactions.navigationOptions = navigationStyle({}, (options, { theme, navigation, route }) => {
|
||||
return {
|
||||
headerRight: () => (
|
||||
<TouchableOpacity
|
||||
@ -727,7 +729,7 @@ WalletTransactions.navigationOptions = ({ navigation, route }) => {
|
||||
<Icon name="kebab-horizontal" type="octicon" size={22} color="#FFFFFF" />
|
||||
</TouchableOpacity>
|
||||
),
|
||||
headerTitle: '',
|
||||
title: '',
|
||||
headerStyle: {
|
||||
backgroundColor: WalletGradient.headerColorFor(route.params.walletType),
|
||||
borderBottomWidth: 0,
|
||||
@ -738,7 +740,7 @@ WalletTransactions.navigationOptions = ({ navigation, route }) => {
|
||||
headerTintColor: '#FFFFFF',
|
||||
headerBackTitleVisible: false,
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
flex: {
|
||||
|
@ -24,12 +24,12 @@ import {
|
||||
BlueButtonLink,
|
||||
BlueFormMultiInput,
|
||||
BlueLoading,
|
||||
BlueNavigationStyle,
|
||||
BlueSpacing10,
|
||||
BlueSpacing20,
|
||||
BlueSpacing40,
|
||||
BlueTextCentered,
|
||||
} from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import SquareEnumeratedWords, { SquareEnumeratedWordsContentAlign } from '../../components/SquareEnumeratedWords';
|
||||
import BottomModal from '../../components/BottomModal';
|
||||
import { HDSegwitBech32Wallet, MultisigHDWallet } from '../../class';
|
||||
@ -573,9 +573,9 @@ const styles = StyleSheet.create({
|
||||
squareButtonWrapper: { height: 50, width: 250 },
|
||||
});
|
||||
|
||||
ViewEditMultisigCosigners.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
title: loc.multisig.manage_keys,
|
||||
ViewEditMultisigCosigners.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.multisig.view_edit_cosigners_title,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
import React, { useCallback, useContext, useState } from 'react';
|
||||
import { InteractionManager, useWindowDimensions, ActivityIndicator, View, StatusBar, StyleSheet } from 'react-native';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText, BlueNavigationStyle, BlueCopyTextToClipboard } from '../../BlueComponents';
|
||||
import { useFocusEffect, useRoute, useNavigation, useTheme } from '@react-navigation/native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueSpacing20, SafeBlueArea, BlueText, BlueCopyTextToClipboard } from '../../BlueComponents';
|
||||
import Privacy from '../../Privacy';
|
||||
import Biometric from '../../class/biometrics';
|
||||
import loc from '../../loc';
|
||||
import { useFocusEffect, useRoute, useNavigation, useTheme } from '@react-navigation/native';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
@ -97,8 +99,8 @@ const WalletXpub = () => {
|
||||
);
|
||||
};
|
||||
|
||||
WalletXpub.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
WalletXpub.navigationOptions = navigationStyle({
|
||||
closeButton: true,
|
||||
title: loc.wallets.xpub_title,
|
||||
headerLeft: null,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user