Skip to content

Commit

Permalink
change font
Browse files Browse the repository at this point in the history
  • Loading branch information
milon27 committed Jul 24, 2021
1 parent 66384b1 commit e642b7f
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 23 deletions.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"eject": "expo eject"
},
"dependencies": {
"@expo-google-fonts/lobster-two": "^0.2.0",
"@react-native-async-storage/async-storage": "^1.13.0",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/drawer": "^5.12.5",
Expand All @@ -35,4 +36,4 @@
"@babel/core": "^7.9.0"
},
"private": true
}
}
Binary file removed src/assets/img/logo.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/layouts/form/MButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const styles = StyleSheet.create({
borderRadius: 5,
paddingHorizontal: 10,
marginVertical: 15,
height: 45,
height: 48,
elevation: 4,
zIndex: 2
},
Expand Down
12 changes: 8 additions & 4 deletions src/components/layouts/modal/PasswordModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ export default function PasswordModal({ open, setOpen, item }) {
}
return (
<MModal title="Password Details" open={open || false} setOpen={setOpen} onSubmit={onSubmit} submitText="Delete Password" cancelText="Edit" onCancel={onEdit}>
<Text style={styles.text}>Site: {item?.title} </Text>
<Text selectable={true} style={styles.text}>URL: {item?.url} </Text>
<Text selectable={true} style={styles.text}>Username: {item?.username} </Text>
<Text selectable={true} style={styles.text}>Email: {item?.email}</Text>
<Text style={styles.text}>Title: {item?.title} </Text>

{item?.url.length > 0 ? <Text selectable={true} style={styles.text}>URL: {item?.url} </Text> : null}

{item?.username.length > 0 ? <Text selectable={true} style={styles.text}>Username: {item?.username} </Text> : null}

{item?.email.length > 0 ? <Text selectable={true} style={styles.text}>Email: {item?.email}</Text> : null}
<Text selectable={true} style={styles.text}>Password: {pass}</Text>

{item?.other.length > 0 ? <Text selectable={true} style={styles.text}>Other Info: {item?.other}</Text> : null}

</MModal>
Expand Down
13 changes: 12 additions & 1 deletion src/components/navigation/DashStackNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ import CreateCategory from './../screens/dashboard/CreateCategory';
import Fav from './../screens/favourite/Fav';
import AllCat from './../screens/category/AllCat';
import ChangePassword from './../screens/password/ChangePassword';
import { useFonts, LobsterTwo_400Regular } from '@expo-google-fonts/lobster-two';
import { Text } from 'react-native';

const dashStack = createStackNavigator()
/**
* @description we will use it to navigate to different screen when the user is logged in.
*/
export default function DashStackNav() {
const nav = useNavigation()

let [fontsLoaded] = useFonts({
LobsterTwo_400Regular
});


return (
<dashStack.Navigator initialRouteName={URL.HOME_SCREEN}

Expand All @@ -44,7 +52,10 @@ export default function DashStackNav() {
<dashStack.Screen name={URL.HOME_SCREEN} component={HomeScreen}
options={
{
title: "PASSWORDZ",
title: "Passwordz",
headerTitleStyle: {
fontFamily: !fontsLoaded ? "" : 'LobsterTwo_400Regular', fontSize: 28
},
// align-left
headerLeft: () => (<Icon size={28} type={DefineIcon.Feather} style={{ paddingHorizontal: 25 }} name="settings" onPress={() => { nav.toggleDrawer() }} />),
headerRight: () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/navigation/DrawerContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function DrawerContent({ navigation: nav }) {
<Image
height={50}
width={50}
source={require('../../assets/img/logo.png')}
source={require('../../../assets/icon.png')}
style={styles.logo}
/>
</View>
Expand Down
11 changes: 8 additions & 3 deletions src/components/screens/auth/SignIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import DefineIcon from '../../layouts/icon/DefineIcon';
import Icon from './../../layouts/icon/Icon';
import { StatusBar } from 'expo-status-bar';
import axios from 'axios';
import LOGO from '../../../assets/img/logo.png'
import LOGO from '../../../../assets/icon.png'
import { useIsFocused } from '@react-navigation/native';

export default function SignIn() {
const isFocused = useIsFocused()
//global state
const { app } = useContext(StateContext)
const { authDispatch, appDispatch } = useContext(DispatchContext)
Expand Down Expand Up @@ -49,8 +51,11 @@ export default function SignIn() {
const ue = await Helper.getUserEmail()
setInput({ ...input, [N_EMAIL]: ue })
}
setUserLoggedInEmail()
}, [])
if (isFocused) {
setUserLoggedInEmail()
}

}, [isFocused])
//local method

const onSubmit = async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/screens/auth/SignUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import AppAction from './../../../utils/context/actions/AppAction';
import DefineIcon from '../../layouts/icon/DefineIcon';
import Icon from './../../layouts/icon/Icon';
import { StatusBar } from 'expo-status-bar';
import LOGO from '../../../assets/img/logo.png'
import LOGO from '../../../../assets/icon.png'


export default function SignUp() {
Expand Down Expand Up @@ -153,7 +153,7 @@ const styles = StyleSheet.create({
fontWeight: "bold",
color: Theme.COLOR_PRIMARY,
fontSize: 25,
marginVertical: 15,
marginBottom: 15,
padding: 7
},
logo: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/screens/dashboard/CreateCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default function CreateCategory() {
console.log("CreateCategory", val)
if (val.success) {
setTitle("")
Helper.Toast("" + val.title)
Helper.Toast("Category Created Succesfully.")
} else {
Helper.Toast("" + val.title)
Helper.Toast("" + val.desc)
}
}

Expand Down
18 changes: 13 additions & 5 deletions src/components/screens/dashboard/CreatePassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ import DropDownPicker from 'react-native-dropdown-picker'
import AxiosHelper from './../../../utils/helpers/AxiosHelper';
import AppAction from './../../../utils/context/actions/AppAction';
import { StatusBar } from 'expo-status-bar';
import NavLink from './../../layouts/form/NavLink';
import URL from './../../../utils/helpers/URL';
import { useIsFocused } from '@react-navigation/native';

export default function CreatePassword({ route: { params }, navigation }) {

const item = params?.item;

const isF = useIsFocused()

const { app } = useContext(StateContext)
const { appDispatch } = useContext(DispatchContext)

Expand Down Expand Up @@ -103,12 +108,14 @@ export default function CreatePassword({ route: { params }, navigation }) {
console.log("error Create Password.js->", e);
}
}
load()
if (isF) {
load()
}

return () => {
token.cancel()
}
}, [cat.length])
}, [isF, cat.length])

// local method
const onSubmit = async () => {
Expand Down Expand Up @@ -158,17 +165,17 @@ export default function CreatePassword({ route: { params }, navigation }) {
if (val.success) {
setInput(clear_init)
setValue([])
Helper.Toast("" + val.title)
Helper.Toast("" + val.desc)
} else {
Helper.Toast("" + val.title)
Helper.Toast("" + val.desc)
}

}

return (
<ScrollView style={{ backgroundColor: Theme.COLOR_BG }}>

<Container style={{ paddingTop: 30 }}>
<Container style={{ paddingVertical: 30 }}>
<StatusBar style={Theme.STATUS_BAR} />

<Input value={input[N_TITLE]} error={error[N_TITLE]}
Expand Down Expand Up @@ -268,6 +275,7 @@ export default function CreatePassword({ route: { params }, navigation }) {

<MButton style={{ elevation: 0 }} title={item ? "Update Now" : "Create New"} loading={app?.loading} color={Theme.COLOR_PRIMARY} onPress={onSubmit} disabled={app?.loading} />
{/* while loading.. it should be disabled */}
<NavLink title="Don't have Category? Create New Now" url={URL.CREATE_CATEGORY}></NavLink>
</Container>
</ScrollView>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/screens/splash/Splash.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Splash() {
<Image
height={75}
width={75}
source={require('../../../assets/img/logo.png')}
source={require('../../../../assets/icon.png')}
style={styles.logo}
/>
</View>
Expand All @@ -31,7 +31,7 @@ const styles = StyleSheet.create({
backgroundColor: Theme.COLOR_WHITE
},
text: {
color: Theme.COLOR_WHITE,
color: Theme.COLOR_PRIMARY,
fontSize: 35,
textAlign: "center"
},
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helpers/Theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Theme1 = {

const Theme = {
COLOR_PRIMARY: "#6763D5",//
COLOR_ACCENT: "#6763D5",//
COLOR_ACCENT: "#FBE261",//
COLOR_BG: "#FDFDFD",//
COLOR_GRAY: "#909090",//
COLOR_WHITE: "#fff",
Expand Down

0 comments on commit e642b7f

Please sign in to comment.