Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"backgroundColor": "#ffffff"
}
],
"expo-secure-store"
"expo-secure-store",
"expo-font"
],
"experiments": {
"typedRoutes": true
Expand Down
Binary file added assets/.DS_Store
Binary file not shown.
Binary file added assets/images/eye.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/registration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"preset": "jest-expo"
},
"dependencies": {
"@expo-google-fonts/inter": "^0.3.0",
"@expo/vector-icons": "^14.0.2",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-navigation/bottom-tabs": "^7.2.0",
Expand Down
5 changes: 5 additions & 0 deletions src/entites/brigade/ui/BrigadeSelector/BrigadeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ import { CardBrigade } from "../CardBrigade/CardBrigade";
import { IBrigade } from "../../type/IBirgade";
import React, { useState } from "react";
import { BrigadeSelectorProps } from "./type";
<<<<<<< HEAD
import { useNavigation } from "@react-navigation/native";

=======
import { BrigadeChooseInfo } from "../BrigadeChooseInfo/BrigadeChooseInfo";
import { ITypePage } from "@/shared/type/ITypePage/ITypePage";
>>>>>>> main


export const BrigadeSelector: React.FC<BrigadeSelectorProps> = ({ handlerSubmit, setValue, stateRegister, handlerNextPage }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/ui/AuthTitle/AuthTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const styles = StyleSheet.create({
color:'white',
fontSize: 24,
fontWeight: 700,
paddingBottom:140,
paddingBottom:265,
textAlign: 'center',
paddingTop:52,

Expand Down
38 changes: 29 additions & 9 deletions src/shared/ui/ErrorField/ErrorField.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
import * as React from 'react';
import { View } from 'react-native';
import { TextInput, HelperText } from 'react-native-paper'
import { TextInput, HelperText } from 'react-native-paper';
import { ErrorFieldProps } from './type';
import { StyleSheet } from 'react-native';

export const ErrorField: React.FC<ErrorFieldProps> = ({ error }) => {
return (
<View style={{ paddingLeft:30 }}>
<HelperText type="error" >
{error}
</HelperText>
</View>
);
return (
<View style={styles.error}>
<HelperText type="error" style={styles.helperText}>
{error}
</HelperText>
</View>
);
};

}
const styles = StyleSheet.create({
error: {
width: '100%',
maxWidth: 412,
alignSelf: 'center',
marginTop: 4,
marginBottom: 4,
paddingHorizontal: 20
},
helperText: {
fontSize: 12,
lineHeight: 16,
paddingVertical: 0,
paddingHorizontal: 0,
textAlign: 'left',
paddingLeft:20
}
});
75 changes: 50 additions & 25 deletions src/shared/ui/Input/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,56 @@
import { TextInput } from "react-native-paper"
import { InputProps } from "./type"
import { View } from "react-native";
import { View,Image } from "react-native";
import { StyleSheet } from "react-native";
import React, {useState} from 'react';

// const eyeIcon = require('../../../assets/images/eye.png');



export const Input: React.FC<InputProps> = ({ typePage, field, placeholder, type = "default" }) => {
export const Input: React.FC<InputProps> = ({typePage, field, placeholder, type = "default",secureTextEntry = false,showEyeIcon = false }) => {
const [isSecure,setIsSecure] = useState(secureTextEntry)
const [isFocused, setIsFocused] = useState(false)
return (
<View style={{ alignItems: "center" }}>
<TextInput style={[

styles.input,
typePage === 'login' ? styles.login : styles.register
typePage === 'login' ? styles.login : styles.register,
{
borderRadius: 28,
borderWidth:1,
borderColor: isFocused ? 'orange' : '#eee',
}
]}
keyboardType={type}
underlineColor="transparent"
selectionColor="transparent"
outlineColor="transparent"
keyboardType={type}
mode="flat"
label={placeholder}
value={field.value}
onChangeText={field.onChange}
theme={{ primary: 'blue', underlineColor: 'transparent', roundness: 110 }}
{...field}
value={field.value}
onChangeText={field.onChange}
secureTextEntry={isSecure}

onFocus={() => setIsFocused(true)}
onBlush={() => setIsFocused(false)}
theme={{
colors: {
primary: 'transperent',
background: 'white',
placeholder: isFocused ? 'orange' : 'gray',
text: 'black',
underlineColor: 'transparent',
},
roundness: 28
}}
underlineColor="transparent"
activeOutlineColor="transparent"
right={
showEyeIcon && (
<TextInput.Icon
icon={isSecure ? 'eye-off' : 'eye'}
onPress={() => setIsSecure(!isSecure)}
color={isFocused ? 'orange' : '#999'}
/>
)
}
{...field}
/>
</View>
)
Expand All @@ -31,17 +59,14 @@ export const Input: React.FC<InputProps> = ({ typePage, field, placeholder, type

const styles = StyleSheet.create({
input: {
width: 330,
height: 55,
backgroundColor: 'white',
color: '',

paddingHorizontal: 15,
marginBottom:10,

borderWidth: 1,
borderRadius: 110,

width: 330,
height: 55,
backgroundColor:'white',
paddingHorizontal: 24,
marginBottom:16,
overwlow:'hidden',
// borderWidth: 1,
// borderColor:'#eee',
},
login: {

Expand Down
2 changes: 2 additions & 0 deletions src/shared/ui/InputController/InputController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const InputController: React.FC<InputControllerProps> = ({ errors, contro
field={field}
placeholder={input.placeholder}
type={input.type}
secureTextEntry={input.name === 'password'}
showEyeIcon={input.name === 'password'}
/>
<ErrorField error={errors[input.name]?.message} />

Expand Down
15 changes: 10 additions & 5 deletions src/shared/ui/ItemButton/ItemButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,21 @@ export const ItemButton: React.FC<ButtonProps> = ({ title, handleSubmit, }) => {
}
const styles = StyleSheet.create({
button: {
marginTop: 10,
width: 330,
height:55,

marginTop:0,
alignSelf: 'center',

backgroundColor:'orange',
color:'black',
width: 330,
alignSelf: 'center',

},
label:{
color:'black',
fontSize: 16,
textAlign:'center',
lineHeight: 30,
color:'black',
fontSize: 20,
fontWeight: 700,
}
});
31 changes: 31 additions & 0 deletions src/widgets/auth/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import React, { useState } from "react";
import { AuthForm, AuthLink } from "@/features/auth"
import { AuthTitle } from "@/features/auth/ui/AuthTitle/AuthTitle"
import { AuthProps } from "@/shared/type/AuthProps/type"
<<<<<<< HEAD
import { View, Text, StyleSheet,ImageBackground,} from "react-native"
=======
import { View, Text, StyleSheet } from "react-native"
>>>>>>> main


function AuthText(props: { text: string }) {
Expand All @@ -14,6 +18,32 @@ export const Auth: React.FC<AuthProps> = ({ typePage }) => {


return (
<<<<<<< HEAD
<ImageBackground
source={require("../../../assets/images/registration.png")}
resizeMode='cover'
style={styles.back}
>
<View style={styles.container}>
<AuthTitle text={typePage} />
<AuthForm typePage={typePage} />
<AuthLink typePage={typePage} />
</View>
</ImageBackground>
);
};

const styles = StyleSheet.create({
back:{
flex: 1,
width: 412,
height: 917,
},
container: {
flex: 1,
}
})
=======
<View style={styles.back}>
{!stateRegister && <AuthTitle text={typePage} />}
<AuthForm typePage={typePage} stateRegister={stateRegister} setStateRegister={setStateRegister} />
Expand All @@ -38,6 +68,7 @@ const styles = StyleSheet.create({
height: 917,
}
})
>>>>>>> main



Expand Down