mg-library 1.0.465 → 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 +23 -20
- 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,25 +453,20 @@ export function MGCamera(props) {
|
|
452
453
|
</View>
|
453
454
|
);
|
454
455
|
return (
|
455
|
-
<View style={{ flex: 1,
|
456
|
-
<
|
456
|
+
<View style={{ flex: 1, justifyContent: 'flex-start', alignItems: 'center' }}>
|
457
|
+
<Card header={cardHeader} footer={cardFooter}>
|
458
|
+
<View style={{ alignItems: 'center' }}>
|
459
|
+
<CameraView
|
460
|
+
style={{ width: captureWidth, height: captureHeight }}
|
461
|
+
facing={facing}
|
462
|
+
ref={(r) => {
|
463
|
+
camera = r
|
464
|
+
}}>
|
465
|
+
</CameraView>
|
466
|
+
</View>
|
467
|
+
</Card>
|
457
468
|
</View>
|
458
469
|
)
|
459
|
-
/* return (
|
460
|
-
<View style={{ flex: 1, justifyContent: 'flex-start', backgroundColor: 'red', alignItems: 'center' }}>
|
461
|
-
<Card header={cardHeader} footer={cardFooter}>
|
462
|
-
<View style={{ alignItems: 'center' }}>
|
463
|
-
<CameraView
|
464
|
-
style={{ width: captureWidth, height: captureHeight }}
|
465
|
-
facing={facing}
|
466
|
-
ref={(r) => {
|
467
|
-
camera = r
|
468
|
-
}}>
|
469
|
-
</CameraView>
|
470
|
-
</View>
|
471
|
-
</Card>
|
472
|
-
</View>
|
473
|
-
) */
|
474
470
|
}
|
475
471
|
|
476
472
|
export function MGCameraPreview(props) {
|
@@ -615,8 +611,15 @@ export function MGGoBack(props) {
|
|
615
611
|
color={props.theme['color-primary-500']}
|
616
612
|
onPress={() => props.process.goBack()} />
|
617
613
|
);
|
614
|
+
/* return (
|
615
|
+
<View style={{ flexGrow: 1, alignItems: 'flex-start', marginTop: -20 }}>
|
616
|
+
<Button
|
617
|
+
appearance='ghost'
|
618
|
+
accessoryLeft={goBackIcon} />
|
619
|
+
</View>
|
620
|
+
) */
|
618
621
|
return (
|
619
|
-
<View style={{
|
622
|
+
<View style={{ alignItems: 'flex-start', marginTop: -20 }}>
|
620
623
|
<Button
|
621
624
|
appearance='ghost'
|
622
625
|
accessoryLeft={goBackIcon} />
|
package/constants.js
CHANGED