-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
564ec4b
commit 554d980
Showing
54 changed files
with
1,091 additions
and
360 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions
58
packages/core-mobile/app/new/components/SimpleTextInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React from 'react' | ||
import { | ||
Icons, | ||
TextInput, | ||
TouchableOpacity, | ||
useTheme, | ||
View | ||
} from '@avalabs/k2-alpine' | ||
|
||
export const SimpleTextInput = ({ | ||
name, | ||
setName, | ||
placeholder | ||
}: { | ||
name: string | ||
setName: (name: string) => void | ||
placeholder?: string | ||
}): React.JSX.Element => { | ||
const { | ||
theme: { colors } | ||
} = useTheme() | ||
return ( | ||
<View | ||
sx={{ | ||
marginTop: 27, | ||
paddingHorizontal: 13, | ||
backgroundColor: colors.$surfaceSecondary, | ||
borderRadius: 12, | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
height: 44 | ||
}}> | ||
<TextInput | ||
sx={{ | ||
flex: 1, | ||
fontFamily: 'Inter-Regular', | ||
marginRight: 13, | ||
height: 44, | ||
fontSize: 16, | ||
color: colors.$textPrimary | ||
}} | ||
value={name} | ||
onChangeText={setName} | ||
placeholder={placeholder} | ||
/> | ||
{name.length !== 0 && ( | ||
<TouchableOpacity onPress={() => setName('')}> | ||
<Icons.Action.Clear | ||
width={16} | ||
height={16} | ||
color={colors.$textSecondary} | ||
/> | ||
</TouchableOpacity> | ||
)} | ||
</View> | ||
) | ||
} |
68 changes: 68 additions & 0 deletions
68
packages/core-mobile/app/new/components/onboarding/AddRecoveryMethods.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React from 'react' | ||
import { View, Text, Button } from '@avalabs/k2-alpine' | ||
import BlurredBarsContentLayout from 'new/components/navigation/BlurredBarsContentLayout' | ||
import { | ||
RecoveryMethod, | ||
RecoveryMethods | ||
} from 'new/hooks/useAvailableRecoveryMethods' | ||
import { OidcAuth } from 'new/types' | ||
import { RecoveryMethodList } from '../../components/RecoveryMethodList' | ||
|
||
export const AddRecoveryMethods = ({ | ||
selectedMethod, | ||
setSelectedMethod, | ||
oidcAuth, | ||
availableRecoveryMethods, | ||
allowsUserToAddLater, | ||
onNext, | ||
onSkip | ||
}: { | ||
selectedMethod?: RecoveryMethods | ||
setSelectedMethod: (method: RecoveryMethods) => void | ||
oidcAuth?: OidcAuth | ||
availableRecoveryMethods: RecoveryMethod[] | ||
allowsUserToAddLater: boolean | ||
onNext: () => void | ||
onSkip: () => void | ||
}): JSX.Element => { | ||
return ( | ||
<BlurredBarsContentLayout> | ||
<View | ||
sx={{ | ||
flex: 1, | ||
paddingTop: 25, | ||
paddingHorizontal: 16, | ||
justifyContent: 'space-between' | ||
}}> | ||
<View> | ||
<Text variant="heading2" sx={{ marginBottom: 8 }}> | ||
Add a recovery method | ||
</Text> | ||
<Text variant="body1" sx={{ marginBottom: 40 }}> | ||
Add recovery methods to securely restore access in case you lose | ||
your credentials. | ||
</Text> | ||
<RecoveryMethodList | ||
selectedMethod={selectedMethod} | ||
data={availableRecoveryMethods} | ||
onPress={setSelectedMethod} | ||
/> | ||
</View> | ||
<View sx={{ gap: 16, marginBottom: 36 }}> | ||
<Button | ||
type="primary" | ||
size="large" | ||
onPress={onNext} | ||
disabled={availableRecoveryMethods.length === 0}> | ||
Next | ||
</Button> | ||
{oidcAuth === undefined && allowsUserToAddLater && ( | ||
<Button type="tertiary" size="large" onPress={onSkip}> | ||
Skip | ||
</Button> | ||
)} | ||
</View> | ||
</View> | ||
</BlurredBarsContentLayout> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
packages/core-mobile/app/new/components/onboarding/Confirmation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import React from 'react' | ||
import BlurredBarsContentLayout from 'new/components/navigation/BlurredBarsContentLayout' | ||
import { | ||
Avatar, | ||
Button, | ||
SafeAreaView, | ||
ScrollView, | ||
View, | ||
useTheme, | ||
Text | ||
} from '@avalabs/k2-alpine' | ||
import { Platform } from 'react-native' | ||
import { KeyboardAvoidingView } from 'react-native' | ||
import { AVATARS } from 'new/consts/avatars' | ||
|
||
export const Confirmation = ({ | ||
selectedAvatarId, | ||
onNext | ||
}: { | ||
selectedAvatarId?: string | ||
onNext: () => void | ||
}): JSX.Element => { | ||
const { | ||
theme: { colors } | ||
} = useTheme() | ||
|
||
const avatar = AVATARS.find(a => a.id === selectedAvatarId) | ||
|
||
return ( | ||
<BlurredBarsContentLayout> | ||
<KeyboardAvoidingView | ||
style={{ flex: 1 }} | ||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}> | ||
<SafeAreaView sx={{ flex: 1 }}> | ||
<ScrollView sx={{ flex: 1 }} contentContainerSx={{ padding: 16 }}> | ||
<View sx={{ alignItems: 'center', paddingTop: 100 }}> | ||
{avatar?.source && ( | ||
<Avatar | ||
backgroundColor={colors.$surfacePrimary} | ||
source={avatar.source} | ||
size="large" | ||
hasBlur={true} | ||
/> | ||
)} | ||
</View> | ||
<View sx={{ paddingHorizontal: 48 }}> | ||
<Text | ||
sx={{ marginTop: 96, textAlign: 'center' }} | ||
variant="heading3"> | ||
That’s it!{'\n'} Enjoy your wallet | ||
</Text> | ||
<Text | ||
variant="subtitle1" | ||
sx={{ textAlign: 'center', marginTop: 20 }}> | ||
You can now start buying, swapping, sending, receiving crypto | ||
and collectibles with no added fees | ||
</Text> | ||
</View> | ||
</ScrollView> | ||
<View | ||
sx={{ | ||
padding: 16, | ||
backgroundColor: '$surfacePrimary' | ||
}}> | ||
<Button size="large" type="primary" onPress={onNext}> | ||
Let’s go! | ||
</Button> | ||
</View> | ||
</SafeAreaView> | ||
</KeyboardAvoidingView> | ||
</BlurredBarsContentLayout> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.