Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

update all placeholders

ammarahm-ed4b8eacc9388e
diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.js
index 39a92c0d1..9916ee4f6 100644
--- a/apps/mobile/src/components/SimpleList/index.js
+++ b/apps/mobile/src/components/SimpleList/index.js
@@ -19,6 +19,7 @@ import * as Animatable from 'react-native-animatable';
import {PinnedItemList} from './PinnedItemList';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import NavigationService from '../../services/NavigationService';
+import { Placeholder } from '../ListPlaceholders';
const sectionListRef = createRef();
const AnimatedFlatlist = Animatable.createAnimatableComponent(FlatList);
@@ -246,15 +247,6 @@ const SimpleList = ({
}}>
<>
{placeholder}
- <Text
- style={{
- color: colors.icon,
- fontSize: SIZE.sm,
- fontFamily: WEIGHT.regular,
- marginTop: 35,
- }}>
- {placeholderText}
- </Text>
</>
</View>
);
diff --git a/apps/mobile/src/views/Favorites/index.js b/apps/mobile/src/views/Favorites/index.js
index 781480733..f23193756 100644
--- a/apps/mobile/src/views/Favorites/index.js
+++ b/apps/mobile/src/views/Favorites/index.js
@@ -5,6 +5,7 @@ import {NoteItemWrapper} from '../../components/SimpleList/NoteItemWrapper';
import {useTracked} from '../../provider';
import {ACTIONS} from '../../provider/actions';
import {db, ToastEvent} from '../../utils/utils';
+import { Placeholder } from '../../components/ListPlaceholders';
export const Favorites = ({route, navigation}) => {
const [state, dispatch] = useTracked();
const {favorites} = state;
@@ -88,7 +89,7 @@ export const Favorites = ({route, navigation}) => {
focused={isFocused}
onRefresh={_onRefresh}
RenderItem={NoteItemWrapper}
- placeholder={<></>}
+ placeholder={<Placeholder type="favorites" />}
placeholderText="Notes you favorite appear here"
/>
);
diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/views/Folders/index.js
index 42e952cee..a8ea722a0 100644
--- a/apps/mobile/src/views/Folders/index.js
+++ b/apps/mobile/src/views/Folders/index.js
@@ -9,6 +9,7 @@ import {ACTIONS} from '../../provider/actions';
import {eSendEvent} from '../../services/eventManager';
import {eScrollEvent} from '../../services/events';
import NavigationService from '../../services/NavigationService';
+import { Placeholder } from '../../components/ListPlaceholders';
export const Folders = ({route, navigation}) => {
const [state, dispatch] = useTracked();
const {notebooks} = state;
@@ -111,7 +112,7 @@ export const Folders = ({route, navigation}) => {
hideMore={params.hideMore}
isMove={params.isMove}
noteToMove={params.note}
- placeholder={<></>}
+ placeholder={<Placeholder type="notebooks" />}
pinned={true}
placeholderText="Notebooks you add will appear here"
/>
diff --git a/apps/mobile/src/views/Home/index.js b/apps/mobile/src/views/Home/index.js
index 2731bcfe1..6c75de30a 100755
--- a/apps/mobile/src/views/Home/index.js
+++ b/apps/mobile/src/views/Home/index.js
@@ -8,6 +8,7 @@ import {eSendEvent} from '../../services/eventManager';
import {eOnLoadNote, eScrollEvent} from '../../services/events';
import {openEditorAnimation} from '../../utils/animations';
import {DDS} from '../../utils/utils';
+import { Placeholder } from '../../components/ListPlaceholders';
export const Home = ({route, navigation}) => {
const [state, dispatch] = useTracked();
@@ -96,7 +97,7 @@ export const Home = ({route, navigation}) => {
pinned={true}
focused={isFocused}
RenderItem={NoteItemWrapper}
- placeholder={<></>}
+ placeholder={<Placeholder type="notes"/>}
placeholderText={`Notes you write appear here`}
/>
</>
diff --git a/apps/mobile/src/views/Notes/index.js b/apps/mobile/src/views/Notes/index.js
index 28b9ee640..2158af5d6 100644
--- a/apps/mobile/src/views/Notes/index.js
+++ b/apps/mobile/src/views/Notes/index.js
@@ -17,6 +17,7 @@ import {
import {openEditorAnimation} from '../../utils/animations';
import {db, DDS, editing, ToastEvent} from '../../utils/utils';
import { NoteItemWrapper } from '../../components/SimpleList/NoteItemWrapper';
+import { Placeholder } from '../../components/ListPlaceholders';
export const Notes = ({route, navigation}) => {
const [state, dispatch] = useTracked();
@@ -196,7 +197,7 @@ export const Notes = ({route, navigation}) => {
focused={isFocused}
customRefresh={_onRefresh}
RenderItem={NoteItemWrapper}
- placeholder={<></>}
+ placeholder={<Placeholder type="notes"/>}
placeholderText={`Add some notes to this" ${
params.type ? params.type : 'topic.'
}`}
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js
index 283cfceae..6ee2e03ec 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/views/Settings/index.js
@@ -626,7 +626,7 @@ export const Settings = ({route, navigation}) => {
textAlignVertical: 'center',
color: colors.pri,
}}>
- {settings.fontScale ? settings.fontScale + 'X' : '1X'}
+ {settings?.fontScale ? settings.fontScale + 'X' : '1X'}
</Text>
</View>
</TouchableOpacity>
diff --git a/apps/mobile/src/views/Tags/index.js b/apps/mobile/src/views/Tags/index.js
index 594e46d27..edc74ccd6 100644
--- a/apps/mobile/src/views/Tags/index.js
+++ b/apps/mobile/src/views/Tags/index.js
@@ -2,7 +2,7 @@ import { useIsFocused } from '@react-navigation/native';
import React, { useEffect } from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { pv, SIZE, WEIGHT } from '../../common/common';
-import { TagsPlaceHolder } from '../../components/ListPlaceholders';
+import { Placeholder } from '../../components/ListPlaceholders';
import SimpleList from '../../components/SimpleList';
import { useTracked } from '../../provider';
import { ACTIONS } from '../../provider/actions';
@@ -73,7 +73,7 @@ export const Tags = ({route, navigation}) => {
type="tags"
focused={isFocused}
RenderItem={RenderItem}
- placeholder={<TagsPlaceHolder colors={colors} />}
+ placeholder={<Placeholder type="tags" />}
placeholderText="Tags added to notes appear here"
/>
);
diff --git a/apps/mobile/src/views/Trash/index.js b/apps/mobile/src/views/Trash/index.js
index 4d79f8d28..ac80c9f7c 100644
--- a/apps/mobile/src/views/Trash/index.js
+++ b/apps/mobile/src/views/Trash/index.js
@@ -1,17 +1,13 @@
-import {useIsFocused} from '@react-navigation/native';
-import React, {useEffect} from 'react';
-import {simpleDialogEvent} from '../../components/DialogManager/recievers';
-import {TEMPLATE_EMPTY_TRASH} from '../../components/DialogManager/templates';
-import {TrashPlaceHolder} from '../../components/ListPlaceholders';
-import {NotebookItem} from '../../components/NotebookItem';
-import NoteItem from '../../components/NoteItem';
-import SelectionWrapper from '../../components/SelectionWrapper';
+import { useIsFocused } from '@react-navigation/native';
+import React, { useEffect } from 'react';
+import { simpleDialogEvent } from '../../components/DialogManager/recievers';
+import { TEMPLATE_EMPTY_TRASH } from '../../components/DialogManager/templates';
+import { Placeholder } from '../../components/ListPlaceholders';
import SimpleList from '../../components/SimpleList';
-import {useTracked} from '../../provider';
-import {ACTIONS} from '../../provider/actions';
-import {w} from '../../utils/utils';
-import {NoteItemWrapper} from '../../components/SimpleList/NoteItemWrapper';
-import {NotebookItemWrapper} from '../../components/SimpleList/NotebookItemWrapper';
+import { NotebookItemWrapper } from '../../components/SimpleList/NotebookItemWrapper';
+import { NoteItemWrapper } from '../../components/SimpleList/NoteItemWrapper';
+import { useTracked } from '../../provider';
+import { ACTIONS } from '../../provider/actions';
export const Trash = ({route, navigation}) => {
const [state, dispatch] = useTracked();
@@ -85,7 +81,7 @@ export const Trash = ({route, navigation}) => {
type="trash"
focused={isFocused}
RenderItem={RenderItem}
- placeholder={<TrashPlaceHolder colors={colors} />}
+ placeholder={<Placeholder type="trash" />}
placeholderText="Deleted notes & notebooks appear here."
/>
);