mg-library 1.0.572 → 1.0.574
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 +33 -13
- package/functions.js +4 -4
- package/package.json +1 -1
package/blocks.js
CHANGED
|
@@ -189,7 +189,7 @@ export function MGLogin(props) {
|
|
|
189
189
|
|
|
190
190
|
let cardFooter = (
|
|
191
191
|
<View>
|
|
192
|
-
<Button
|
|
192
|
+
{/* <Button
|
|
193
193
|
accessoryRight={loginIcon}
|
|
194
194
|
onPress={handleSubmit((data) => {
|
|
195
195
|
props.setNavigator(undefined);
|
|
@@ -202,7 +202,28 @@ export function MGLogin(props) {
|
|
|
202
202
|
data);
|
|
203
203
|
})}>
|
|
204
204
|
{mgFunctionsLib.i18nString('login', props.language)}
|
|
205
|
-
</Button>
|
|
205
|
+
</Button> */}
|
|
206
|
+
|
|
207
|
+
<NBButton
|
|
208
|
+
style={{ width: 150 }} py={4} colorScheme="primary"
|
|
209
|
+
leftIcon={
|
|
210
|
+
<NBIcon as={MaterialCommunityIcons} name="login" size="lg" color="white" />
|
|
211
|
+
}
|
|
212
|
+
onPress={handleSubmit((data) => {
|
|
213
|
+
props.setNavigator(undefined);
|
|
214
|
+
mgLoginLib.onPressLogin(
|
|
215
|
+
props.dispatch,
|
|
216
|
+
props.actions,
|
|
217
|
+
props.app,
|
|
218
|
+
props.apiUrl,
|
|
219
|
+
props.language,
|
|
220
|
+
data);
|
|
221
|
+
})}>
|
|
222
|
+
<MGText category='p1' color='white'>
|
|
223
|
+
{mgFunctionsLib.i18nString('login', props.language)}
|
|
224
|
+
</MGText>
|
|
225
|
+
</NBButton>
|
|
226
|
+
|
|
206
227
|
</View>
|
|
207
228
|
);
|
|
208
229
|
|
|
@@ -573,7 +594,6 @@ export function MGCamera(props) {
|
|
|
573
594
|
<View>
|
|
574
595
|
<View style={{ flexDirection: 'row' }}>
|
|
575
596
|
<View style={{ flex: 1, alignItems: 'center' }}>
|
|
576
|
-
|
|
577
597
|
<NBButton
|
|
578
598
|
style={{ width: 150 }} py={4} colorScheme="primary"
|
|
579
599
|
leftIcon={
|
|
@@ -591,21 +611,18 @@ export function MGCamera(props) {
|
|
|
591
611
|
{mgFunctionsLib.i18nString('doInvertCamera', props.language)}
|
|
592
612
|
</MGText>
|
|
593
613
|
</NBButton>
|
|
594
|
-
|
|
595
614
|
</View>
|
|
596
615
|
<View style={{ flex: 1, alignItems: 'center' }}>
|
|
597
|
-
|
|
598
616
|
<NBButton
|
|
599
617
|
style={{ width: 150 }} py={4} colorScheme="primary"
|
|
600
618
|
leftIcon={
|
|
601
619
|
<NBIcon as={MaterialCommunityIcons} name="camera-outline" size="lg" color="white" />
|
|
602
620
|
}
|
|
603
|
-
onPress={__takePicture}>
|
|
621
|
+
onPress={__takePicture}>
|
|
604
622
|
<MGText category="p1" color="white">
|
|
605
623
|
{mgFunctionsLib.i18nString('doTakePhoto', props.language)}
|
|
606
624
|
</MGText>
|
|
607
625
|
</NBButton>
|
|
608
|
-
|
|
609
626
|
</View>
|
|
610
627
|
</View>
|
|
611
628
|
</View>
|
|
@@ -674,13 +691,16 @@ export function MGCameraPreview(props) {
|
|
|
674
691
|
<View>
|
|
675
692
|
<View style={{ flexDirection: 'row' }}>
|
|
676
693
|
<View style={{ flex: 1, alignItems: 'center' }}>
|
|
677
|
-
<
|
|
678
|
-
style={{ width: 150 }}
|
|
679
|
-
|
|
680
|
-
|
|
694
|
+
<NBButton
|
|
695
|
+
style={{ width: 150 }} py={4} colorScheme="primary"
|
|
696
|
+
leftIcon={
|
|
697
|
+
<NBIcon as={MaterialCommunityIcons} name="cloud-upload-outline" size="lg" color="white" />
|
|
698
|
+
}
|
|
681
699
|
onPress={__savePicture}>
|
|
682
|
-
<MGText
|
|
683
|
-
|
|
700
|
+
<MGText category="p1" color="white">
|
|
701
|
+
{mgFunctionsLib.i18nString('doSavePhoto', props.language)}
|
|
702
|
+
</MGText>
|
|
703
|
+
</NBButton>
|
|
684
704
|
</View>
|
|
685
705
|
</View>
|
|
686
706
|
</View>
|
package/functions.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Toast from 'react-native-root-toast';
|
|
2
2
|
import { StyleSheet, View, Dimensions } from 'react-native';
|
|
3
3
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
4
|
-
import { Box, Button, Icon } from 'native-base';
|
|
4
|
+
import { Box, Button as NBButton, Icon as NBIcon } from 'native-base';
|
|
5
5
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
import 'moment/locale/es';
|
|
@@ -24,12 +24,12 @@ export function navigatorHeader(insets, theme, onPressLogout, company) {
|
|
|
24
24
|
<MGText category='h5' style={{ color: 'white' }}>{companyDescription}</MGText>
|
|
25
25
|
</View>
|
|
26
26
|
<View style={{ flexGrow: 0.1, flexDirection: 'column' }}>
|
|
27
|
-
<
|
|
27
|
+
<NBButton
|
|
28
28
|
style={{ alignSelf: 'center' }}
|
|
29
29
|
bg="transparent"
|
|
30
30
|
onPress={onPressLogout}>
|
|
31
|
-
<
|
|
32
|
-
</
|
|
31
|
+
<NBIcon as={MaterialCommunityIcons} name="logout" size="lg" color="white" />
|
|
32
|
+
</NBButton>
|
|
33
33
|
</View>
|
|
34
34
|
</View>
|
|
35
35
|
</Box>
|