A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
refactoring
ammarahm-ed5153fa23094a
diff --git a/apps/mobile/src/components/NotesList/index.js b/apps/mobile/src/components/NotesList/index.jsindex 3bd41b48f..7163401a9 100644--- a/apps/mobile/src/components/NotesList/index.js+++ b/apps/mobile/src/components/NotesList/index.js@@ -17,6 +17,7 @@ import NoteItem from '../NoteItem';import SelectionWrapper from '../SelectionWrapper';import {eSendEvent} from '../../services/eventManager';import {eScrollEvent} from '../../services/events';+import {ToastEvent} from '../../utils/utils';export const NotesList = ({isGrouped = false}) => {const [state, dispatch] = useTracked();@@ -182,6 +183,7 @@ export const NotesList = ({isGrouped = false}) => {setRefreshing(true);setTimeout(() => {setRefreshing(false);+ ToastEvent.show('Sync Complete', 'success');}, 1000);}}refreshing={refreshing}diff --git a/apps/mobile/src/components/Toast/index.js b/apps/mobile/src/components/Toast/index.jsindex 6941e7361..f265a0d5a 100644--- a/apps/mobile/src/components/Toast/index.js+++ b/apps/mobile/src/components/Toast/index.js@@ -63,65 +63,71 @@ export const Toast = () => {}, []);return (- <AnimatedTouchableOpacity- activeOpacity={opacity + 0.1}- onPress={() => {- alert('hello');- }}- transition="translateY"- duration={250}+ <Animatable.View+ transition={['translateY', 'opacity']}+ duration={500}useNativeDriver={true}- pointerEvents="box-only"style={{- ...toastStyle,- height: 60,- width: DDS.isTab ? normalize(350) : w - 24,- marginHorizontal: 12,- position: 'absolute',- bottom: 15,- zIndex: 999,- borderRadius: 5,- paddingHorizontal: ph + 5,- justifyContent: 'space-between',- elevation: 25,- flexDirection: 'row',+ width: '100%',alignItems: 'center',+ opacity: toast ? 1 : 0,transform: [{- translateY: toast ? 0 : 150,+ translateY: toast ? 0 : 300,},],}}>- <Text+ <AnimatedTouchableOpacity+ activeOpacity={opacity + 0.1}style={{...toastStyle,- backgroundColor: 'transparent',- fontFamily: WEIGHT.regular,- fontSize: SIZE.sm,- }}>- <Icon- name={- toastStyle.color === colors.errorText- ? 'alert-circle'- : 'check-circle'- }- color={toastStyle.color}- size={SIZE.sm}- />- {' '}- {message}- </Text>+ maxWidth: DDS.isTab ? normalize(350) : w - 24,+ minWidth: DDS.isTab ? normalize(250) : w / 2,+ marginHorizontal: 12,+ position: 'absolute',+ alignSelf: 'center',+ bottom: 100,+ zIndex: 999,+ borderRadius: 5,- <TouchableOpacity activeOpacity={1}>+ paddingHorizontal: ph,+ paddingVertical: pv,+ justifyContent: 'center',+ elevation: 25,+ flexDirection: 'row',+ alignItems: 'center',+ }}><Textstyle={{...toastStyle,- fontFamily: WEIGHT.bold,+ backgroundColor: 'transparent',+ fontFamily: WEIGHT.regular,fontSize: SIZE.sm,}}>- {data.actionText}+ <Icon+ name={+ toastStyle.color === colors.errorText+ ? 'alert-circle'+ : 'check-circle'+ }+ color={toastStyle.color}+ size={SIZE.sm}+ />+ {' '}+ {message}</Text>- </TouchableOpacity>- </AnimatedTouchableOpacity>++ <TouchableOpacity activeOpacity={1}>+ <Text+ style={{+ ...toastStyle,+ fontFamily: WEIGHT.bold,+ fontSize: SIZE.sm,+ }}>+ {data.actionText}+ </Text>+ </TouchableOpacity>+ </AnimatedTouchableOpacity>+ </Animatable.View>);};diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/views/Folders/index.jsindex aa1b0a9d0..ee244be09 100644--- a/apps/mobile/src/views/Folders/index.js+++ b/apps/mobile/src/views/Folders/index.js@@ -74,13 +74,13 @@ export const Folders = ({navigation}) => {return (<Container- bottomButtonText="Add a new notebook"+ bottomButtonText="Create a new notebook"menu={params.canGoBack ? false : true}preventDefaultMargins={preventDefaultMargins}heading={params.title}canGoBack={params.canGoBack}navigation={navigation}- placeholder="Search your notebook"+ placeholder="Search all notebooks"data={notebooks}bottomButtonOnPress={() => {AddNotebookEvent(null);diff --git a/apps/mobile/src/views/Home/index.js b/apps/mobile/src/views/Home/index.jsindex a0194ce44..5eac39295 100755--- a/apps/mobile/src/views/Home/index.js+++ b/apps/mobile/src/views/Home/index.js@@ -28,12 +28,12 @@ export const Home = ({navigation}) => {return (<Container- bottomButtonText="Add a new note"+ bottomButtonText="Create a new note"heading="Home"customIcon="menu"verticalMenumenu- placeholder="Search your notes"+ placeholder="Search all notes"canGoBack={false}bottomButtonOnPress={() => {if (DDS.isTab) {diff --git a/apps/mobile/src/views/Notebook/index.js b/apps/mobile/src/views/Notebook/index.jsindex 8523d240f..57a30dda2 100644--- a/apps/mobile/src/views/Notebook/index.js+++ b/apps/mobile/src/views/Notebook/index.js@@ -96,10 +96,10 @@ export const Notebook = ({navigation}) => {return (<Container- bottomButtonText="Add new topic"+ bottomButtonText="Create a new topic"preventDefaultMargins={preventDefaultMargins}navigation={navigation}- placeholder={`Search in ${params.title}`}+ placeholder={`Search in "${params.title}"`}heading={params.title}canGoBack={true}data={params.notebook.topics}