mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-15 11:59:21 +01:00
Merge branch 'master' into scr
This commit is contained in:
commit
850ac2c653
5 changed files with 89 additions and 58 deletions
|
@ -10,7 +10,6 @@ import RNQRGenerator from 'rn-qr-generator';
|
||||||
import { CommonToolTipActions } from '../typings/CommonToolTipActions';
|
import { CommonToolTipActions } from '../typings/CommonToolTipActions';
|
||||||
import { useSettings } from '../hooks/context/useSettings';
|
import { useSettings } from '../hooks/context/useSettings';
|
||||||
import { useExtendedNavigation } from '../hooks/useExtendedNavigation';
|
import { useExtendedNavigation } from '../hooks/useExtendedNavigation';
|
||||||
import { isDesktop } from '../blue_modules/environment';
|
|
||||||
|
|
||||||
interface AddressInputScanButtonProps {
|
interface AddressInputScanButtonProps {
|
||||||
isLoading?: boolean;
|
isLoading?: boolean;
|
||||||
|
@ -146,7 +145,6 @@ export const AddressInputScanButton = ({
|
||||||
testID={testID}
|
testID={testID}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
onPress={toolTipOnPress}
|
onPress={toolTipOnPress}
|
||||||
isMenuPrimaryAction={isDesktop}
|
|
||||||
buttonStyle={type === 'default' ? buttonStyle : undefined}
|
buttonStyle={type === 'default' ? buttonStyle : undefined}
|
||||||
accessibilityLabel={loc.send.details_scan}
|
accessibilityLabel={loc.send.details_scan}
|
||||||
accessibilityHint={loc.send.details_scan_hint}
|
accessibilityHint={loc.send.details_scan_hint}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
import React, { useState, useRef } from 'react';
|
import React, { useState, useRef } from 'react';
|
||||||
import { Animated, Platform, StyleSheet, TouchableOpacity, View } from 'react-native';
|
import { Animated, Platform, StyleSheet, TouchableOpacity, View } from 'react-native';
|
||||||
|
// @ts-ignore: no declaration file yet
|
||||||
import { Camera, CameraApi, CameraType, Orientation } from 'react-native-camera-kit';
|
import { Camera, CameraApi, CameraType, Orientation } from 'react-native-camera-kit';
|
||||||
import loc from '../loc';
|
import loc from '../loc';
|
||||||
import { Icon } from '@rneui/base';
|
import { Icon } from '@rneui/base';
|
||||||
import { OnOrientationChangeData, OnReadCodeData } from 'react-native-camera-kit/dist/CameraProps';
|
|
||||||
import { triggerSelectionHapticFeedback } from '../blue_modules/hapticFeedback';
|
import { triggerSelectionHapticFeedback } from '../blue_modules/hapticFeedback';
|
||||||
|
import { isDesktop } from '../blue_modules/environment';
|
||||||
|
// @ts-ignore: no declaration file yet
|
||||||
|
import { OnOrientationChangeData, OnReadCodeData } from 'react-native-camera-kit/dist/CameraProps';
|
||||||
|
|
||||||
interface CameraScreenProps {
|
interface CameraScreenProps {
|
||||||
onCancelButtonPress: () => void;
|
onCancelButtonPress: () => void;
|
||||||
|
@ -95,6 +98,8 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.screen}>
|
<View style={styles.screen}>
|
||||||
|
{/* Render top buttons only if not desktop as they would not be relevant */}
|
||||||
|
{!isDesktop && (
|
||||||
<View style={styles.topButtons}>
|
<View style={styles.topButtons}>
|
||||||
<TouchableOpacity style={[styles.topButton, uiRotationStyle, torchMode ? styles.activeTorch : {}]} onPress={onSetTorch}>
|
<TouchableOpacity style={[styles.topButton, uiRotationStyle, torchMode ? styles.activeTorch : {}]} onPress={onSetTorch}>
|
||||||
<Animated.View style={styles.topButtonImg}>
|
<Animated.View style={styles.topButtonImg}>
|
||||||
|
@ -132,28 +137,55 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
)}
|
||||||
<View style={styles.cameraContainer}>
|
<View style={styles.cameraContainer}>
|
||||||
<Camera
|
<Camera
|
||||||
ref={cameraRef}
|
ref={cameraRef}
|
||||||
style={styles.cameraPreview}
|
style={styles.cameraPreview}
|
||||||
cameraType={cameraType}
|
cameraType={cameraType}
|
||||||
resetFocusWhenMotionDetected
|
|
||||||
zoom={zoom}
|
|
||||||
maxZoom={10}
|
|
||||||
scanBarcode
|
scanBarcode
|
||||||
resizeMode="cover"
|
resizeMode="cover"
|
||||||
onZoom={handleZoom}
|
|
||||||
onReadCode={handleReadCode}
|
onReadCode={handleReadCode}
|
||||||
torchMode={torchMode ? 'on' : 'off'}
|
torchMode={torchMode ? 'on' : 'off'}
|
||||||
|
resetFocusWhenMotionDetected
|
||||||
|
zoom={zoom}
|
||||||
|
onZoom={handleZoom}
|
||||||
|
maxZoom={10}
|
||||||
onOrientationChange={handleOrientationChange}
|
onOrientationChange={handleOrientationChange}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.bottomButtons}>
|
<View style={styles.bottomButtons}>
|
||||||
<TouchableOpacity onPress={onCancelButtonPress}>
|
<TouchableOpacity onPress={onCancelButtonPress}>
|
||||||
<Animated.Text style={[styles.backTextStyle, uiRotationStyle]}>{loc._.cancel}</Animated.Text>
|
<Animated.Text style={[styles.backTextStyle, uiRotationStyle]}>{loc._.cancel}</Animated.Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
{isDesktop ? (
|
||||||
|
<View style={styles.rightButtonsContainer}>
|
||||||
|
{showImagePickerButton && (
|
||||||
|
<TouchableOpacity
|
||||||
|
accessibilityRole="button"
|
||||||
|
accessibilityLabel={loc._.pick_image}
|
||||||
|
style={[styles.bottomButton, styles.spacing, uiRotationStyle]}
|
||||||
|
onPress={onImagePickerButtonPress}
|
||||||
|
>
|
||||||
|
<Animated.View style={styles.topButtonImg}>
|
||||||
|
<Icon name="image" type="font-awesome" color="#ffffff" />
|
||||||
|
</Animated.View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
)}
|
||||||
|
{showFilePickerButton && (
|
||||||
|
<TouchableOpacity
|
||||||
|
accessibilityRole="button"
|
||||||
|
accessibilityLabel={loc._.pick_file}
|
||||||
|
style={[styles.bottomButton, styles.spacing, uiRotationStyle]}
|
||||||
|
onPress={onFilePickerButtonPress}
|
||||||
|
>
|
||||||
|
<Animated.View style={styles.topButtonImg}>
|
||||||
|
<Icon name="file-import" type="font-awesome-5" color="#ffffff" />
|
||||||
|
</Animated.View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
<TouchableOpacity style={[styles.bottomButton, uiRotationStyle]} onPress={onSwitchCameraPressed}>
|
<TouchableOpacity style={[styles.bottomButton, uiRotationStyle]} onPress={onSwitchCameraPressed}>
|
||||||
<Animated.View style={[styles.topButtonImg, uiRotationStyle]}>
|
<Animated.View style={[styles.topButtonImg, uiRotationStyle]}>
|
||||||
{Platform.OS === 'ios' ? (
|
{Platform.OS === 'ios' ? (
|
||||||
|
@ -163,6 +195,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
|
||||||
)}
|
)}
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1838,7 +1838,7 @@ PODS:
|
||||||
- ReactCommon/turbomodule/bridging
|
- ReactCommon/turbomodule/bridging
|
||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNScreens (4.9.0):
|
- RNScreens (4.9.1):
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
- hermes-engine
|
- hermes-engine
|
||||||
|
@ -2331,7 +2331,7 @@ SPEC CHECKSUMS:
|
||||||
RNRate: 7641919330e0d6688ad885a985b4bd697ed7d14c
|
RNRate: 7641919330e0d6688ad885a985b4bd697ed7d14c
|
||||||
RNReactNativeHapticFeedback: 00ba111b82aa266bb3ee1aa576831c2ea9a9dfad
|
RNReactNativeHapticFeedback: 00ba111b82aa266bb3ee1aa576831c2ea9a9dfad
|
||||||
RNReanimated: 66cf0f600a26d2b5e74c6e0b1c77c1ab1f62fc05
|
RNReanimated: 66cf0f600a26d2b5e74c6e0b1c77c1ab1f62fc05
|
||||||
RNScreens: ee069f569efb54804334321c916643f8cc9debaf
|
RNScreens: b3975354ddafe0fb00112a9054898ccf0d92c78e
|
||||||
RNShare: 6204e6a1987ba3e7c47071ef703e5449a0e3548a
|
RNShare: 6204e6a1987ba3e7c47071ef703e5449a0e3548a
|
||||||
RNSVG: a07e14363aa208062c6483bad24a438d5986d490
|
RNSVG: a07e14363aa208062c6483bad24a438d5986d490
|
||||||
RNVectorIcons: 182892e7d1a2f27b52d3c627eca5d2665a22ee28
|
RNVectorIcons: 182892e7d1a2f27b52d3c627eca5d2665a22ee28
|
||||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -67,7 +67,7 @@
|
||||||
"react-native": "0.76.7",
|
"react-native": "0.76.7",
|
||||||
"react-native-biometrics": "3.0.1",
|
"react-native-biometrics": "3.0.1",
|
||||||
"react-native-blue-crypto": "github:BlueWallet/react-native-blue-crypto#3cb5442",
|
"react-native-blue-crypto": "github:BlueWallet/react-native-blue-crypto#3cb5442",
|
||||||
"react-native-camera-kit": "14.2.0",
|
"react-native-camera-kit": "https://github.com/BlueWallet/react-native-camera-kit.git#3193427",
|
||||||
"react-native-crypto": "2.2.0",
|
"react-native-crypto": "2.2.0",
|
||||||
"react-native-default-preference": "https://github.com/BlueWallet/react-native-default-preference.git#6338a1f1235e4130b8cfc2dd3b53015eeff2870c",
|
"react-native-default-preference": "https://github.com/BlueWallet/react-native-default-preference.git#6338a1f1235e4130b8cfc2dd3b53015eeff2870c",
|
||||||
"react-native-device-info": "14.0.4",
|
"react-native-device-info": "14.0.4",
|
||||||
|
@ -22094,8 +22094,8 @@
|
||||||
},
|
},
|
||||||
"node_modules/react-native-camera-kit": {
|
"node_modules/react-native-camera-kit": {
|
||||||
"version": "14.2.0",
|
"version": "14.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-camera-kit/-/react-native-camera-kit-14.2.0.tgz",
|
"resolved": "git+ssh://git@github.com/BlueWallet/react-native-camera-kit.git#1e1921223bc9da636f9889d96b03df5f77dc7bf1",
|
||||||
"integrity": "sha512-rPk/4Ux52/Kc6oIPk0x6NsrvDkeL+kd/GAUJ4xBtTlnmiWjLTgeA2Vjgg9ik03mmyf6rV+LaqaOBT7KejhuHKQ==",
|
"integrity": "sha512-jwVriBGZai7b4TCM0JXR0xqBY0HPtu2NSQQMETTNLyTjYYqkHEK2uaWkq/GY5B93gbAnTGJ5bRyQAqfWkPjDEw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
"react-native": "0.76.7",
|
"react-native": "0.76.7",
|
||||||
"react-native-biometrics": "3.0.1",
|
"react-native-biometrics": "3.0.1",
|
||||||
"react-native-blue-crypto": "github:BlueWallet/react-native-blue-crypto#3cb5442",
|
"react-native-blue-crypto": "github:BlueWallet/react-native-blue-crypto#3cb5442",
|
||||||
"react-native-camera-kit": "14.2.0",
|
"react-native-camera-kit": "https://github.com/BlueWallet/react-native-camera-kit.git#3193427",
|
||||||
"react-native-crypto": "2.2.0",
|
"react-native-crypto": "2.2.0",
|
||||||
"react-native-default-preference": "https://github.com/BlueWallet/react-native-default-preference.git#6338a1f1235e4130b8cfc2dd3b53015eeff2870c",
|
"react-native-default-preference": "https://github.com/BlueWallet/react-native-default-preference.git#6338a1f1235e4130b8cfc2dd3b53015eeff2870c",
|
||||||
"react-native-device-info": "14.0.4",
|
"react-native-device-info": "14.0.4",
|
||||||
|
|
Loading…
Add table
Reference in a new issue