mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
minor clean
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
|
||||
import { AnimatePresence } from '@tamagui/animate-presence'
|
||||
import { ArrowLeft, Nfc } from '@tamagui/lucide-icons'
|
||||
import { Button, Image, XStack, YStack, styled, Text } from 'tamagui'
|
||||
import { bgBlue, bgGreen, borderColor, textBlack, textColor1, textColor2 } from '../utils/colors'
|
||||
import { bgGreen, textBlack } from '../utils/colors'
|
||||
import CustomButton from './CustomButton'
|
||||
|
||||
const GalleryItem = styled(YStack, {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { ScrollView, Text, YStack, Image } from 'tamagui';
|
||||
import { Text, YStack, Image } from 'tamagui';
|
||||
import { XStack } from 'tamagui';
|
||||
import CustomButton from '../components/CustomButton';
|
||||
import { BadgeCheck, Binary, List, QrCode, Smartphone } from '@tamagui/lucide-icons';
|
||||
import { bgGreen, textBlack } from '../utils/colors';
|
||||
import { QrCode } from '@tamagui/lucide-icons';
|
||||
import { textBlack } from '../utils/colors';
|
||||
import useUserStore from '../stores/userStore';
|
||||
import { scanQRCode } from '../utils/qrCode';
|
||||
import OPENPASSPORT_LOGO from '../images/openpassport.png';
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
import React from 'react';
|
||||
import { YStack, Text, XStack, Image } from 'tamagui';
|
||||
import { Camera, ShieldCheck, SquarePen } from '@tamagui/lucide-icons';
|
||||
import { bgGreen, blueColor, textBlack } from '../utils/colors';
|
||||
import { YStack, Text, Image } from 'tamagui';
|
||||
import { Camera, SquarePen } from '@tamagui/lucide-icons';
|
||||
import { bgGreen, textBlack } from '../utils/colors';
|
||||
import { startCameraScan } from '../utils/cameraScanner';
|
||||
import CustomButton from '../components/CustomButton';
|
||||
import useNavigationStore from '../stores/navigationStore';
|
||||
import PASSPORT_DRAWING from '../images/passport_drawing.png'
|
||||
interface CameraScreenProps {
|
||||
setSheetIsOpen: (value: boolean) => void
|
||||
}
|
||||
|
||||
const CameraScreen: React.FC<CameraScreenProps> = ({ setSheetIsOpen }) => {
|
||||
const {
|
||||
setSelectedTab,
|
||||
} = useNavigationStore();
|
||||
|
||||
return (
|
||||
<YStack f={1}>
|
||||
@@ -28,11 +24,6 @@ const CameraScreen: React.FC<CameraScreenProps> = ({ setSheetIsOpen }) => {
|
||||
<CustomButton bgColor='#ffff' text="Manual Input" onPress={() => setSheetIsOpen(true)} Icon={<SquarePen color={textBlack} size={24} />} />
|
||||
</YStack>
|
||||
|
||||
{/* <XStack mt="$3.5" justifyContent='center' alignItems='center' gap="$1.5">
|
||||
<ShieldCheck color={textBlack} size={12} />
|
||||
<Text color={textBlack} fontSize="$3">private and secured</Text>
|
||||
</XStack> */}
|
||||
|
||||
</YStack >
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useCallback, useMemo } from 'react';
|
||||
import { YStack, XStack, Text, Select, Adapt, Sheet, Fieldset, Button, Spinner, ToggleGroup, Switch } from 'tamagui';
|
||||
import { YStack, XStack, Text, Select, Adapt, Sheet, Fieldset, Button, Spinner, Switch } from 'tamagui';
|
||||
import { Check, ChevronDown, ChevronUp, Cpu, Minus, Plus } from '@tamagui/lucide-icons';
|
||||
import { bgColor, bgGreen, bgGreen2, blueColor, borderColor, greenColorLight, redColorDark, textBlack } from '../utils/colors';
|
||||
import useUserStore from '../stores/userStore';
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import { YStack, Text, XStack, Button, ScrollView } from 'tamagui';
|
||||
import { bgGreen, borderColor, textBlack, textColor1 } from '../utils/colors';
|
||||
import { YStack, ScrollView } from 'tamagui';
|
||||
import { Carousel } from '../components/Carousel';
|
||||
import US_PASSPORT from '../images/us_passport.jpeg'
|
||||
import REMOVE_CASE from '../images/remove_case.jpeg'
|
||||
import US_PASSPORT_LASTPAGE from '../images/passport_lastpage_graybg.jpeg'
|
||||
import US_PASSPORT_LASTPAGE_IOS from '../images/passport_lastpage_iphone.jpeg'
|
||||
import US_PASSPORT_LASTPAGE_ANDROID from '../images/passport_lastpage_android.jpeg'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { YStack, XStack, Text, Spinner, Progress } from 'tamagui';
|
||||
import { CheckCircle } from '@tamagui/lucide-icons';
|
||||
import { countryCodes, DEVELOPMENT_MODE, max_cert_bytes, } from '../../../common/src/constants/constants';
|
||||
import { bgGreen, bgGreen2, greenColorLight, separatorColor, textBlack } from '../utils/colors';
|
||||
import { DEVELOPMENT_MODE, max_cert_bytes, } from '../../../common/src/constants/constants';
|
||||
import { bgGreen, greenColorLight, separatorColor, textBlack } from '../utils/colors';
|
||||
import useUserStore from '../stores/userStore';
|
||||
import useNavigationStore from '../stores/navigationStore';
|
||||
import { DisclosureOptions, OpenPassportApp } from '../../../common/src/utils/appType';
|
||||
@@ -37,6 +37,10 @@ const ProveScreen: React.FC<ProveScreenProps> = ({ setSheetRegisterIsOpen }) =>
|
||||
passportData,
|
||||
} = useUserStore()
|
||||
|
||||
if (!passportData) {
|
||||
return <Text mt="$10" fontSize="$9" color={textBlack} textAlign='center' >No passport data</Text>;
|
||||
}
|
||||
|
||||
const [socket, setSocket] = useState<Socket | null>(null);
|
||||
const [isConnecting, setIsConnecting] = useState(false);
|
||||
const { signatureAlgorithm, hashFunction, authorityKeyIdentifier } = parseCertificate(passportData.dsc);
|
||||
|
||||
@@ -8,7 +8,6 @@ import { PassportData, Proof } from '../../../common/src/utils/types';
|
||||
import * as Keychain from 'react-native-keychain';
|
||||
import { loadPassportData, loadSecret, loadSecretOrCreateIt, storePassportData } from '../utils/keychain';
|
||||
import { generateDscSecret } from '../../../common/src/utils/csca';
|
||||
import { genMockPassportData } from '../../../common/src/utils/genMockPassportData';
|
||||
|
||||
interface UserState {
|
||||
passportNumber: string
|
||||
|
||||
Reference in New Issue
Block a user