mg-library 1.0.670 → 1.0.672

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.
Files changed (2) hide show
  1. package/blocks.js +64 -43
  2. package/package.json +1 -1
package/blocks.js CHANGED
@@ -201,30 +201,6 @@ export function MGLogin(props) {
201
201
  <MaterialCommunityIcons name='logout' color='white' size={20} />
202
202
  );
203
203
 
204
- /* let cardFooter = (
205
- <View>
206
- <NBButton
207
- py={4} colorScheme="primary"
208
- leftIcon={
209
- <NBIcon as={MaterialCommunityIcons} name="login" size="lg" color="white" />
210
- }
211
- onPress={handleSubmit((data) => {
212
- props.setNavigator(undefined);
213
- mgLoginLib.onPressLogin(
214
- props.dispatch,
215
- props.actions,
216
- props.app,
217
- props.apiUrl,
218
- props.language,
219
- data);
220
- })}>
221
- <MGText category='p1' color='white'>
222
- {mgFunctionsLib.i18nString('login', props.language)}
223
- </MGText>
224
- </NBButton>
225
- </View>
226
- ); */
227
-
228
204
  let cardFooter = (
229
205
  <View>
230
206
  <MGButton
@@ -460,7 +436,7 @@ export function MGCamera(props) {
460
436
  <View>
461
437
  <View style={{ flexDirection: 'row' }}>
462
438
  <View style={{ flex: 1, alignItems: 'center' }}>
463
- <NBButton
439
+ {/* <NBButton
464
440
  style={{ width: 150 }} py={4} colorScheme="primary"
465
441
  leftIcon={
466
442
  <NBIcon as={MaterialCommunityIcons} name="camera-flip-outline" size="lg" color="white" />
@@ -476,8 +452,24 @@ export function MGCamera(props) {
476
452
  <MGText category="p1" color="white">
477
453
  {mgFunctionsLib.i18nString('doInvertCamera', props.language)}
478
454
  </MGText>
479
- </NBButton>
455
+ </NBButton> */}
456
+ <MGButton
457
+ icon="camera-flip-outline"
458
+ title={mgFunctionsLib.i18nString('doInvertCamera', props.language)}
459
+ action="primary"
460
+ variant="solid"
461
+ py="$4"
462
+ style={{ width: 150 }}
463
+ onPress={() => {
464
+ setFacing(
465
+ facing === mgConstantsLib.CAMERA_FACING_BACK
466
+ ? mgConstantsLib.CAMERA_FACING_FRONT
467
+ : mgConstantsLib.CAMERA_FACING_BACK
468
+ );
469
+ }}
470
+ />
480
471
  </View>
472
+ {/*
481
473
  <View style={{ flex: 1, alignItems: 'center' }}>
482
474
  <NBButton
483
475
  style={{ width: 150 }} py={4} colorScheme="primary"
@@ -489,6 +481,17 @@ export function MGCamera(props) {
489
481
  {mgFunctionsLib.i18nString('doTakePhoto', props.language)}
490
482
  </MGText>
491
483
  </NBButton>
484
+ </View> */}
485
+ <View style={{ flex: 1, alignItems: 'center' }}>
486
+ <MGButton
487
+ icon="camera-outline"
488
+ title={mgFunctionsLib.i18nString('doTakePhoto', props.language)}
489
+ action="primary"
490
+ variant="solid"
491
+ py="$4"
492
+ onPress={__takePicture}
493
+ style={{ width: 150 }}
494
+ />
492
495
  </View>
493
496
  </View>
494
497
  </View>
@@ -553,20 +556,37 @@ export function MGCameraPreview(props) {
553
556
  <MGText>{mgFunctionsLib.i18nString('previewPhoto', props.language)}</MGText>
554
557
  </View>
555
558
  );
559
+ /* const cardFooter = (
560
+ <View>
561
+ <View style={{ flexDirection: 'row' }}>
562
+ <View style={{ flex: 1, alignItems: 'center' }}>
563
+ <NBButton
564
+ style={{ width: 150 }} py={4} colorScheme="primary"
565
+ leftIcon={
566
+ <NBIcon as={MaterialCommunityIcons} name="cloud-upload-outline" size="lg" color="white" />
567
+ }
568
+ onPress={__savePicture}>
569
+ <MGText category="p1" color="white">
570
+ {mgFunctionsLib.i18nString('doSavePhoto', props.language)}
571
+ </MGText>
572
+ </NBButton>
573
+ </View>
574
+ </View>
575
+ </View>
576
+ ); */
556
577
  const cardFooter = (
557
578
  <View>
558
579
  <View style={{ flexDirection: 'row' }}>
559
580
  <View style={{ flex: 1, alignItems: 'center' }}>
560
- <NBButton
561
- style={{ width: 150 }} py={4} colorScheme="primary"
562
- leftIcon={
563
- <NBIcon as={MaterialCommunityIcons} name="cloud-upload-outline" size="lg" color="white" />
564
- }
565
- onPress={__savePicture}>
566
- <MGText category="p1" color="white">
567
- {mgFunctionsLib.i18nString('doSavePhoto', props.language)}
568
- </MGText>
569
- </NBButton>
581
+ <MGButton
582
+ icon="cloud-upload-outline"
583
+ title={mgFunctionsLib.i18nString('doSavePhoto', props.language)}
584
+ action="primary"
585
+ variant="solid"
586
+ py="$4"
587
+ onPress={__savePicture}
588
+ style={{ width: 150 }}
589
+ />
570
590
  </View>
571
591
  </View>
572
592
  </View>
@@ -658,13 +678,14 @@ export function MGPopover(props) {
658
678
  export function MGGoBack(props) {
659
679
  return (
660
680
  <View style={{ alignItems: 'flex-start', marginTop: 10 }}>
661
- <NBButton
662
- appearance='ghost'
663
- bg='transparent'
664
- onPress={() => props.process.goBack()}>
665
- <NBIcon as={MaterialCommunityIcons} name='keyboard-backspace' size='2xl' color={props.colors.primary['500']}
666
- />
667
- </NBButton>
681
+ <MGButton
682
+ icon="keyboard-backspace"
683
+ variant="ghost"
684
+ action="primary"
685
+ iconSize={28}
686
+ iconColor={props.colors.primary['500']}
687
+ onPress={() => props.process.goBack()}
688
+ />
668
689
  </View>
669
690
  )
670
691
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.670",
3
+ "version": "1.0.672",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {