mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
REF: Blind fix for import button on android
🤞
This commit is contained in:
parent
2ec23d9147
commit
de642f60be
@ -81,7 +81,7 @@ module.exports = {
|
||||
error: 'Failed to import. Please, make sure that the provided data is valid.',
|
||||
success: 'Success',
|
||||
do_import: 'Import',
|
||||
scan_qr: '...scan QR or import file instead?',
|
||||
scan_qr: 'Scan or import a file',
|
||||
},
|
||||
scanQrWif: {
|
||||
go_back: 'Go Back',
|
||||
|
@ -93,8 +93,8 @@ export default class WalletsAdd extends Component {
|
||||
|
||||
return (
|
||||
<SafeBlueArea>
|
||||
<KeyboardAvoidingView enabled behavior={Platform.OS === 'ios' ? 'padding' : null} keyboardVerticalOffset={62}>
|
||||
<ScrollView>
|
||||
<ScrollView>
|
||||
<KeyboardAvoidingView enabled behavior={Platform.OS === 'ios' ? 'padding' : null} keyboardVerticalOffset={62}>
|
||||
<BlueFormLabel>{loc.wallets.add.wallet_name}</BlueFormLabel>
|
||||
<View
|
||||
style={{
|
||||
@ -336,8 +336,8 @@ export default class WalletsAdd extends Component {
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</KeyboardAvoidingView>
|
||||
</KeyboardAvoidingView>
|
||||
</ScrollView>
|
||||
</SafeBlueArea>
|
||||
);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* global alert */
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { KeyboardAvoidingView, Platform, Dimensions, View, TouchableWithoutFeedback, Keyboard } from 'react-native';
|
||||
import { ScrollView, KeyboardAvoidingView, Platform, Dimensions, View, TouchableWithoutFeedback, Keyboard } from 'react-native';
|
||||
import {
|
||||
BlueFormMultiInput,
|
||||
BlueButtonLink,
|
||||
@ -62,68 +62,66 @@ const WalletsImport = () => {
|
||||
|
||||
return (
|
||||
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1, paddingTop: 40 }}>
|
||||
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
|
||||
<KeyboardAvoidingView behavior="position" enabled>
|
||||
<BlueFormLabel>{loc.wallets.import.explanation}</BlueFormLabel>
|
||||
<BlueSpacing20 />
|
||||
<BlueFormMultiInput
|
||||
value={importText}
|
||||
contextMenuHidden
|
||||
onChangeText={setImportText}
|
||||
inputAccessoryViewID={BlueDoneAndDismissKeyboardInputAccessory.InputAccessoryViewID}
|
||||
onFocus={() => setIsToolbarVisibleForAndroid(true)}
|
||||
onBlur={() => setIsToolbarVisibleForAndroid(false)}
|
||||
<ScrollView>
|
||||
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
|
||||
<KeyboardAvoidingView behavior="position" enabled>
|
||||
<BlueFormLabel>{loc.wallets.import.explanation}</BlueFormLabel>
|
||||
<BlueSpacing20 />
|
||||
<BlueFormMultiInput
|
||||
value={importText}
|
||||
contextMenuHidden
|
||||
onChangeText={setImportText}
|
||||
inputAccessoryViewID={BlueDoneAndDismissKeyboardInputAccessory.InputAccessoryViewID}
|
||||
onFocus={() => setIsToolbarVisibleForAndroid(true)}
|
||||
onBlur={() => setIsToolbarVisibleForAndroid(false)}
|
||||
/>
|
||||
{Platform.select({
|
||||
ios: (
|
||||
<BlueDoneAndDismissKeyboardInputAccessory
|
||||
onClearTapped={() => {
|
||||
setImportText('');
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
onPasteTapped={text => {
|
||||
setImportText(text);
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
/>
|
||||
),
|
||||
android: isToolbarVisibleForAndroid && (
|
||||
<BlueDoneAndDismissKeyboardInputAccessory
|
||||
onClearTapped={() => {
|
||||
setImportText('');
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
onPasteTapped={text => {
|
||||
setImportText(text);
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
/>
|
||||
),
|
||||
})}
|
||||
</KeyboardAvoidingView>
|
||||
</TouchableWithoutFeedback>
|
||||
<BlueSpacing20 />
|
||||
<View style={{ flex: 1, alignItems: 'center' }}>
|
||||
<BlueButton
|
||||
disabled={importText.trim().length === 0}
|
||||
title={loc.wallets.import.do_import}
|
||||
buttonStyle={{
|
||||
width: width / 1.5,
|
||||
}}
|
||||
onPress={importButtonPressed}
|
||||
/>
|
||||
{Platform.select({
|
||||
ios: (
|
||||
<BlueDoneAndDismissKeyboardInputAccessory
|
||||
onClearTapped={() => {
|
||||
setImportText('');
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
onPasteTapped={text => {
|
||||
setImportText(text);
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
/>
|
||||
),
|
||||
android: isToolbarVisibleForAndroid && (
|
||||
<BlueDoneAndDismissKeyboardInputAccessory
|
||||
onClearTapped={() => {
|
||||
setImportText('');
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
onPasteTapped={text => {
|
||||
setImportText(text);
|
||||
Keyboard.dismiss();
|
||||
}}
|
||||
/>
|
||||
),
|
||||
})}
|
||||
</KeyboardAvoidingView>
|
||||
</TouchableWithoutFeedback>
|
||||
|
||||
<BlueSpacing20 />
|
||||
<View
|
||||
style={{
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
<BlueButton
|
||||
disabled={importText.trim().length === 0}
|
||||
title={loc.wallets.import.do_import}
|
||||
buttonStyle={{
|
||||
width: width / 1.5,
|
||||
}}
|
||||
onPress={importButtonPressed}
|
||||
/>
|
||||
<BlueButtonLink
|
||||
title={loc.wallets.import.scan_qr}
|
||||
onPress={() => {
|
||||
navigate('ScanQRCode', { launchedBy: 'ImportWallet', onBarScanned, showFileImportButton: true });
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
<BlueSpacing20 />
|
||||
<BlueButtonLink
|
||||
title={loc.wallets.import.scan_qr}
|
||||
onPress={() => {
|
||||
navigate('ScanQRCode', { launchedBy: 'ImportWallet', onBarScanned, showFileImportButton: true });
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeBlueArea>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user