diff --git a/apps/mobile/App.js b/apps/mobile/App.js index 697aa317b..43ba4155f 100644 --- a/apps/mobile/App.js +++ b/apps/mobile/App.js @@ -1,12 +1,21 @@ -import React,{useState} from 'react'; -import NavigationService, {AppContainer} from "./src/services/NavigationService" +import React, {useState, useEffect} from 'react'; +import NavigationService, { + AppContainer, +} from './src/services/NavigationService'; +import {StatusBar} from 'react-native'; const App = () => { - return ( { - NavigationService.setTopLevelNavigator(navigatorRef); - }} - /> + useEffect(() => { + StatusBar.setBackgroundColor('transparent'); + StatusBar.setTranslucent(true); + StatusBar.setBarStyle('dark-content'); + }); + return ( + { + NavigationService.setTopLevelNavigator(navigatorRef); + }} + /> ); }; diff --git a/apps/mobile/src/components/NoteItem/index.js b/apps/mobile/src/components/NoteItem/index.js new file mode 100644 index 000000000..6b7c472f8 --- /dev/null +++ b/apps/mobile/src/components/NoteItem/index.js @@ -0,0 +1,90 @@ +import React, {useState} from 'react'; +import { + View, + Text, + TouchableOpacity, + ScrollView, + Dimensions, + FlatList, +} from 'react-native'; + +import { + COLOR_SCHEME, + SIZE, + br, + ph, + pv, + opacity, + FONT, + WEIGHT, +} from '../../common/common'; + +import Icon from 'react-native-vector-icons/Ionicons'; +import {Reminder} from '../Reminder'; +import {getElevation} from '../../utils/utils'; +const w = Dimensions.get('window').width; +const h = Dimensions.get('window').height; + +const NoteItem = props => { + const [colors, setColors] = useState(COLOR_SCHEME); + const item = props.item; + + return ( + + + + {item.title} + + + {item.headline} + + + + {item.timestamp + ' '} + + + + + + + ); +}; + +export default NoteItem; diff --git a/apps/mobile/src/components/Recents/index.js b/apps/mobile/src/components/Recents/index.js index 3a900fd03..9863b8961 100644 --- a/apps/mobile/src/components/Recents/index.js +++ b/apps/mobile/src/components/Recents/index.js @@ -1,5 +1,12 @@ import React, {useState} from 'react'; -import {View, Text, TouchableOpacity} from 'react-native'; +import { + View, + Text, + TouchableOpacity, + ScrollView, + Dimensions, + FlatList, +} from 'react-native'; import { COLOR_SCHEME, @@ -13,104 +20,150 @@ import { } from '../../common/common'; import Icon from 'react-native-vector-icons/Ionicons'; -import {FlatList} from 'react-native-gesture-handler'; +import {Reminder} from '../Reminder'; +import {getElevation} from '../../utils/utils'; +import NoteItem from '../NoteItem'; +const w = Dimensions.get('window').width; +const h = Dimensions.get('window').height; + +// example data + +const data = [ + { + title: 'One day about', + headline: + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has', + timestamp: '2 hours ago', + type: 'note', + }, + { + title: 'Shopping List', + headline: + 'It is a long established fact that a reader will be distracted by the readable content of', + timestamp: '5 hours ago', + type: 'list', + }, + { + title: 'Reminder', + headline: + 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a ', + timestamp: '2 days ago', + type: 'reminder', + }, + { + title: 'Writing Notes for', + headline: + 'There are many variations of passages of Lorem Ipsum available, but the majority have ', + timestamp: '2 months ago', + }, +]; export const RecentList = () => { const [colors, setColors] = useState(COLOR_SCHEME); + + let blockdata = [ + { + name: '', + icon: 'md-add', + func: () => { + NavigationService.navigate('Editor'); + }, + }, + { + name: 'Reminders', + icon: 'ios-clock', + func: () => {}, + }, + { + name: 'Lists', + icon: 'ios-list', + func: () => {}, + }, + ]; + return ( <> ( - - {item.title} - - - {item.headline} + - End - - - + } + ListHeaderComponent={ + <> + - - {item.timestamp + ' '} - + {blockdata.map(item => ( + + + + {item.name !== '' ? ( + + {item.name} + + ) : ( + undefined + )} + + + ))} + - - - - - - - )} + + + } + renderItem={({item, index}) => } /> ); diff --git a/apps/mobile/src/components/Reminder/index.js b/apps/mobile/src/components/Reminder/index.js index 6ef540c27..572428dbc 100644 --- a/apps/mobile/src/components/Reminder/index.js +++ b/apps/mobile/src/components/Reminder/index.js @@ -23,73 +23,72 @@ export const Reminder = () => { style={{ ...getElevation(10), width: '90%', - marginVertical: Platform.OS === 'ios' ? h * 0.02 : '5%', + marginVertical: Platform.OS === 'ios' ? h * 0.01 : '0%', alignSelf: 'center', borderRadius: br, backgroundColor: colors.accent, paddingHorizontal: ph, - paddingVertical: 5, + marginBottom: 20, + padding: 5, }}> - - - + Pay Utility Bills + + + {'\n'} Amount 5000 RS - - - in + + in + + 00:00{''} + + mins + - 00:00{''} - - mins - - + ); diff --git a/apps/mobile/src/components/SearchInput/index.js b/apps/mobile/src/components/SearchInput/index.js index 956cc1cbc..d5ae7074a 100644 --- a/apps/mobile/src/components/SearchInput/index.js +++ b/apps/mobile/src/components/SearchInput/index.js @@ -27,9 +27,8 @@ export const Search = () => { alignSelf: 'center', borderRadius: br, paddingHorizontal: ph, - paddingVertical: Platform.OS == 'ios' ? pv : pv - 5, - marginTop: 10, - marginBottom: 25, + paddingVertical: Platform.OS == 'ios' ? pv - 3 : pv - 8, + marginBottom: 10, }}> { const [loading, setLoading] = useState(true); const [colors, setColors] = useState(COLOR_SCHEME); - const RenderMenu = ( + const RenderSideMenu = ( + { fontSize: SIZE.xs, marginTop: 10, }}> - Usage: 80.45/100 MB + 80.45/100 MB { Basic User @@ -99,133 +111,57 @@ export const Home = ({navigation}) => { - - - - Home - - - - - - Favourites - - - - - - Settings - - - - - - Sync - - + item.name} + renderItem={({item, index}) => ( + + + + {item.name} + + + )} + /> { ); - let data = [ - { - name: '', - icon: 'md-add', - func: () => { - NavigationService.navigate('Editor'); - }, - }, - { - name: 'Reminders', - icon: 'ios-clock', - func: () => {}, - }, - { - name: 'Lists', - icon: 'ios-list', - func: () => {}, - }, - ]; - useEffect(() => { setTimeout(() => { setLoading(false); @@ -285,7 +201,10 @@ export const Home = ({navigation}) => { }); return ( - + { justifyContent: 'space-between', alignItems: 'center', paddingHorizontal: '5%', - marginTop: Platform.OS == 'ios' ? h * 0.02 : '7.5%', - marginBottom: h * 0.02, + marginTop: Platform.OS == 'ios' ? h * 0.02 : h * 0.04, + marginBottom: h * 0.04, }}> { }}> Notes - + - - - {data.map(item => ( - - - - {item.name !== '' ? ( - - {item.name} - - ) : ( - undefined - )} - - - ))} - - - - diff --git a/apps/mobile/src/views/Lists/index.js b/apps/mobile/src/views/Lists/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/apps/mobile/src/views/Reminders/index.js b/apps/mobile/src/views/Reminders/index.js new file mode 100644 index 000000000..e69de29bb