diff --git a/apps/mobile/src/components/EditorMenu/index.js b/apps/mobile/src/components/EditorMenu/index.js index b92e1ae3f..72fc207fa 100644 --- a/apps/mobile/src/components/EditorMenu/index.js +++ b/apps/mobile/src/components/EditorMenu/index.js @@ -246,7 +246,7 @@ export const EditorMenu = ({ height: 2, width: '100%', marginBottom: 5, - marginTop: Platform.OS == 'ios' ? h * 0.01 : h * 0.03, + marginTop: Platform.OS == 'ios' ? 0 : 45, }} /> {}, hide, update = () => {}}) => { height: 2, width: '100%', marginBottom: 5, - marginTop: Platform.OS == 'ios' ? h * 0.01 : h * 0.03, + marginTop: Platform.OS == 'ios' ? 0 : 45, }} /> diff --git a/apps/mobile/src/components/NoteItem/index.js b/apps/mobile/src/components/NoteItem/index.js index f7a7b6b5b..e9c3fa53d 100644 --- a/apps/mobile/src/components/NoteItem/index.js +++ b/apps/mobile/src/components/NoteItem/index.js @@ -290,7 +290,6 @@ const NoteItem = props => { }} textStyle={{ color: colors.pri, - fontFamily: WEIGHT.regular, fontSize: SIZE.sm, }}> @@ -304,7 +303,7 @@ const NoteItem = props => { color: colors.pri, fontFamily: WEIGHT.regular, - fontSize: SIZE.xs, + fontSize: SIZE.sm, }}> Pin @@ -323,7 +322,7 @@ const NoteItem = props => { color: colors.pri, fontFamily: WEIGHT.regular, - fontSize: SIZE.xs, + fontSize: SIZE.sm, }}> Favorite @@ -333,7 +332,7 @@ const NoteItem = props => { color: colors.pri, fontFamily: WEIGHT.regular, - fontSize: SIZE.xs, + fontSize: SIZE.sm, }}> Share @@ -353,9 +352,9 @@ const NoteItem = props => { color: colors.pri, fontFamily: WEIGHT.regular, - fontSize: SIZE.xs, + fontSize: SIZE.sm, }}> - Move + Add to Notebook { @@ -367,9 +366,9 @@ const NoteItem = props => { color: colors.pri, fontFamily: WEIGHT.regular, - fontSize: SIZE.xs, + fontSize: SIZE.sm, }}> - {item.locked ? 'Remove from vault' : ' Add to Vault'} + {item.locked ? 'Remove from vault' : 'Add to Vault'} { textStyle={{ color: colors.pri, fontFamily: WEIGHT.regular, - fontSize: SIZE.xs, + fontSize: SIZE.sm, }}> Delete diff --git a/apps/mobile/src/components/NotebookItem/index.js b/apps/mobile/src/components/NotebookItem/index.js index 9a01b0947..a65a23a2b 100644 --- a/apps/mobile/src/components/NotebookItem/index.js +++ b/apps/mobile/src/components/NotebookItem/index.js @@ -287,8 +287,7 @@ export const NotebookItem = ({ fontFamily: WEIGHT.regular, fontSize: SIZE.sm, }}> - - {' '}Restore + Restore { @@ -301,8 +300,7 @@ export const NotebookItem = ({ fontFamily: WEIGHT.regular, fontSize: SIZE.sm, }}> - - {' '}Remove + Remove ) : ( @@ -318,8 +316,7 @@ export const NotebookItem = ({ fontFamily: WEIGHT.regular, fontSize: SIZE.sm, }}> - - {' '}Edit + Edit - - {' '}Pin + Pin { @@ -349,8 +345,7 @@ export const NotebookItem = ({ fontFamily: WEIGHT.regular, fontSize: SIZE.sm, }}> - - {' '}Favorite + Favorite - - {' '}Delete + Delete )} diff --git a/apps/mobile/src/components/NotesList/index.js b/apps/mobile/src/components/NotesList/index.js index 8880d4b30..fff5e3d24 100644 --- a/apps/mobile/src/components/NotesList/index.js +++ b/apps/mobile/src/components/NotesList/index.js @@ -261,6 +261,14 @@ export const NotesList = ({ }}> Notes you write will appear here. + + No notes found + } ListHeaderComponent={ @@ -593,6 +601,14 @@ export const NotesList = ({ }}> {emptyPlaceholderText} + + No Notes found + } onScroll={event => { diff --git a/apps/mobile/src/components/header/index.js b/apps/mobile/src/components/header/index.js index 5da05dc6b..3a0102a2d 100644 --- a/apps/mobile/src/components/header/index.js +++ b/apps/mobile/src/components/header/index.js @@ -27,7 +27,7 @@ export const Header = ({ flexDirection: 'row', zIndex: 10, height: 50, - marginTop: Platform.OS === 'ios' ? 10 : 45, + marginTop: Platform.OS === 'ios' ? 0 : 45, marginBottom: 10, justifyContent: 'space-between', alignItems: 'center', diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/views/Folders/index.js index fb4d2ac4b..9ffacff92 100644 --- a/apps/mobile/src/views/Folders/index.js +++ b/apps/mobile/src/views/Folders/index.js @@ -57,6 +57,29 @@ export const Folders = ({navigation}) => { let searchHeight = 0; let marginSet = false; + const slideRight = { + 0: { + transform: [{translateX: -4}], + }, + 0.5: { + transform: [{translateX: 0}], + }, + 1: { + transform: [{translateX: 4}], + }, + }; + const slideLeft = { + 0: { + transform: [{translateX: 4}], + }, + 0.5: { + transform: [{translateX: 0}], + }, + 1: { + transform: [{translateX: -4}], + }, + }; + const setMarginTop = () => { return; if (headerHeight < 30 || searchHeight < 30) { @@ -124,15 +147,17 @@ export const Folders = ({navigation}) => { heading={params.title} canGoBack={false} /> - { - searchHeight = height; - console.log(searchHeight + '' + headerHeight); - setMarginTop(); - }} - placeholder="Search your notebook" - hide={hideHeader} - /> + {notebooks.length == 0 ? null : ( + { + searchHeight = height; + console.log(searchHeight + '' + headerHeight); + setMarginTop(); + }} + placeholder="Search your notebook" + hide={hideHeader} + /> + )} { } numColumns={numColumns} key={numColumns} + ListEmptyComponent={ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Notebooks you add will appear here + + + No Notebooks found + + + } contentContainerStyle={{ width: '100%', alignSelf: 'center', diff --git a/apps/mobile/src/views/Tags/index.js b/apps/mobile/src/views/Tags/index.js index da3a5f24c..d6de93c23 100644 --- a/apps/mobile/src/views/Tags/index.js +++ b/apps/mobile/src/views/Tags/index.js @@ -1,158 +1,374 @@ import React, {useEffect, useState} from 'react'; -import { - ScrollView, - View, - Text, - TouchableOpacity, - Dimensions, - Image, - SafeAreaView, - Platform, - FlatList, -} from 'react-native'; -import NavigationService from '../../services/NavigationService'; -import { - COLOR_SCHEME, - SIZE, - br, - ph, - pv, - opacity, - FONT, - WEIGHT, - onThemeUpdate, - clearThemeUpdateListener, -} from '../../common/common'; -import Icon from 'react-native-vector-icons/Ionicons'; -import {Reminder} from '../../components/Reminder'; -import {ListItem} from '../../components/ListItem'; -import {Header} from '../../components/header'; -import NoteItem from '../../components/NoteItem'; -import {useForceUpdate} from '../ListsEditor'; -import {useAppContext} from '../../provider/useAppContext'; +import {View, Text, Dimensions, SafeAreaView, FlatList} from 'react-native'; +import {SIZE, pv, WEIGHT} from '../../common/common'; +import {Header} from '../../components/header'; +import {useAppContext} from '../../provider/useAppContext'; +import * as Animatable from 'react-native-animatable'; const w = Dimensions.get('window').width; const h = Dimensions.get('window').height; export const Tags = ({navigation}) => { const {colors} = useAppContext(); + const slideRight = { + 0: { + transform: [{scale: 1}, {translateX: -2}], + }, + 0.5: { + transform: [{scale: 0.98}, {translateX: 0}], + }, + 1: { + transform: [{scale: 1.02}, {translateX: 2}], + }, + }; + const slideLeft = { + 0: { + transform: [{scale: 1.02}, {translateX: 2}], + }, + 0.5: { + transform: [{scale: 0.98}, {translateX: 0}], + }, + 1: { + transform: [{scale: 1}, {translateX: -2}], + }, + }; + return ( - - - alignSelf: 'center', - flexDirection: 'row', - justifyContent: 'center', - alignItems: 'center', - flexWrap: 'wrap', - }}> - {[ - '#home', - '#school', - '#water', - '#love', - '#hope', - '#music', - '#notesforbook', - '#hate', - '#worldofwonders', - '#home', - '#school', - '#water', - '#love', - '#hope', - '#music', - '#notesforbook', - '#hate', - '#worldofwonders', - '#home', - '#school', - '#water', - '#love', - '#hope', - '#music', - '#notesforbook', - '#hate', - '#worldofwonders', - '#home', - '#school', - '#water', - '#love', - '#hope', - '#music', - '#notesforbook', - '#hate', - '#worldofwonders', - '#home', - '#school', - '#water', - '#love', - '#hope', - '#music', - '#notesforbook', - '#hate', - '#worldofwonders', - '#home', - '#school', - '#water', - '#love', - '#hope', - '#music', - '#notesforbook', - '#hate', - '#worldofwonders', - '#home', - '#school', - '#water', - '#love', - '#hope', - '#music', - '#notesforbook', - '#hate', - '#worldofwonders', - ].map(item => ( - { - NavigationService.navigate('Notes', { - heading: item, - }); - }} + + + + + + + # + + + + + + + + # + + + + + + + + # + + + + + + + + # + + + + + + + + # + + + + + + + + # + + + + + + + Tags added to notes appear here + + + No tags found + + + } + renderItem={({item, index}) => ( + - {item} + + # + + {item.slice(1)} + + {'\n'} + + 10 notes + - - ))} - + + )} + /> );