mg-library 1.0.451 → 1.0.453
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 -13
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -4,7 +4,7 @@ import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard, Dimensio
|
|
4
4
|
import { Text, Divider, Button, Popover, Card, Layout, Input } from '@ui-kitten/components';
|
5
5
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
6
6
|
import * as ImageManipulator from 'expo-image-manipulator';
|
7
|
-
import { Camera } from 'expo-camera';
|
7
|
+
import { Camera, CameraType, CameraView } from 'expo-camera';
|
8
8
|
import axios from 'axios';
|
9
9
|
import { uploadFile } from '@uploadcare/upload-client';
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
@@ -150,7 +150,7 @@ export function MGLogin(props) {
|
|
150
150
|
source={require('./assets/clubonline.png')}
|
151
151
|
style={{ width: 300, height: 150 }} />
|
152
152
|
{!isKeyboardVisible &&
|
153
|
-
<View style={{ flexDirection: 'column', flexGrow: 1, alignItems: 'center'}}>
|
153
|
+
<View style={{ flexDirection: 'column', flexGrow: 1, alignItems: 'center' }}>
|
154
154
|
<Text style={{ alignSelf: 'center', textAlign: 'center' }} category='h6'>{props.appDescription}</Text>
|
155
155
|
<Text style={{ alignSelf: 'center' }} category='p2'>{props.appVersion}</Text>
|
156
156
|
</View>
|
@@ -204,7 +204,7 @@ export function MGLogin(props) {
|
|
204
204
|
/>
|
205
205
|
)}
|
206
206
|
name="password" />
|
207
|
-
}
|
207
|
+
}
|
208
208
|
</Card>
|
209
209
|
</View>
|
210
210
|
</View>
|
@@ -312,8 +312,8 @@ export function MGCamera(props) {
|
|
312
312
|
}
|
313
313
|
|
314
314
|
//const [type, setType] = useState(Camera.Constants.Type.front);
|
315
|
-
|
316
|
-
const [type, setType] = useState<CameraType>('front');
|
315
|
+
|
316
|
+
const [type, setType] = useState < CameraType > ('front');
|
317
317
|
|
318
318
|
const FlipIcon = () => (
|
319
319
|
<MaterialCommunityIcons
|
@@ -343,7 +343,7 @@ export function MGCamera(props) {
|
|
343
343
|
accessoryLeft={FlipIcon}
|
344
344
|
onPress={() => {
|
345
345
|
setType(
|
346
|
-
// type === Camera.Constants.Type.back ? Camera.Constants.Type.front : Camera.Constants.Type.back
|
346
|
+
// type === Camera.Constants.Type.back ? Camera.Constants.Type.front : Camera.Constants.Type.back
|
347
347
|
type === 'back' ? 'front' : 'back'
|
348
348
|
)
|
349
349
|
}}>
|
@@ -362,17 +362,27 @@ export function MGCamera(props) {
|
|
362
362
|
</View>
|
363
363
|
</View>
|
364
364
|
);
|
365
|
+
/* return (
|
366
|
+
<View>
|
367
|
+
<Card header={cardHeader} footer={cardFooter}>
|
368
|
+
<View style={{ alignItems: 'center' }}>
|
369
|
+
<Camera
|
370
|
+
style={{ width: captureWidth, height: captureHeight }}
|
371
|
+
type={type}
|
372
|
+
ref={(r) => {
|
373
|
+
camera = r
|
374
|
+
}}>
|
375
|
+
</Camera>
|
376
|
+
</View>
|
377
|
+
</Card>
|
378
|
+
</View>
|
379
|
+
) */
|
365
380
|
return (
|
366
381
|
<View>
|
367
382
|
<Card header={cardHeader} footer={cardFooter}>
|
368
383
|
<View style={{ alignItems: 'center' }}>
|
369
|
-
<
|
370
|
-
|
371
|
-
type={type}
|
372
|
-
ref={(r) => {
|
373
|
-
camera = r
|
374
|
-
}}>
|
375
|
-
</Camera>
|
384
|
+
<CameraView style={{ width: captureWidth, height: captureHeight }} facing={type}>
|
385
|
+
</CameraView>
|
376
386
|
</View>
|
377
387
|
</Card>
|
378
388
|
</View>
|