mg-library 1.0.466 → 1.0.467
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocks.js +4 -3
- package/constants.js +3 -0
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -11,6 +11,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
11
|
|
12
12
|
import './prototypes.js';
|
13
13
|
import * as mgFunctionsLib from './functions.js';
|
14
|
+
import * as mgConstantsLib from './constants.js';
|
14
15
|
import * as mgLoginLib from './login.js';
|
15
16
|
|
16
17
|
export function MGWelcome(props) {
|
@@ -404,7 +405,7 @@ export function MGCamera(props) {
|
|
404
405
|
props.process.goForward(props.nextStep);
|
405
406
|
props.dispatch(props.actions.endProcessing());
|
406
407
|
}
|
407
|
-
const [facing, setFacing] = useState(
|
408
|
+
const [facing, setFacing] = useState(mgConstantsLib.CAMERA_FACING_FRONT);
|
408
409
|
const FlipIcon = () => (
|
409
410
|
<MaterialCommunityIcons
|
410
411
|
name='camera-flip-outline'
|
@@ -433,7 +434,7 @@ export function MGCamera(props) {
|
|
433
434
|
accessoryLeft={FlipIcon}
|
434
435
|
onPress={() => {
|
435
436
|
setFacing(
|
436
|
-
facing ===
|
437
|
+
facing === mgConstantsLib.CAMERA_FACING_BACK ? mgConstantsLib.CAMERA_FACING_FRONT : mgConstantsLib.CAMERA_FACING_BACK
|
437
438
|
)
|
438
439
|
}}>
|
439
440
|
<Text>{mgFunctionsLib.i18nString('doInvertCamera', props.language)}</Text>
|
@@ -452,7 +453,7 @@ export function MGCamera(props) {
|
|
452
453
|
</View>
|
453
454
|
);
|
454
455
|
return (
|
455
|
-
<View style={{ flex: 1, justifyContent: 'flex-start',
|
456
|
+
<View style={{ flex: 1, justifyContent: 'flex-start', alignItems: 'center' }}>
|
456
457
|
<Card header={cardHeader} footer={cardFooter}>
|
457
458
|
<View style={{ alignItems: 'center' }}>
|
458
459
|
<CameraView
|
package/constants.js
CHANGED