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
Add a new note icon in editor
ammarahm-ed2b76599bf781
diff --git a/apps/mobile/src/views/Editor/func.js b/apps/mobile/src/views/Editor/func.jsindex dbd7fdb40..d14690290 100644--- a/apps/mobile/src/views/Editor/func.js+++ b/apps/mobile/src/views/Editor/func.js@@ -128,10 +128,7 @@ export async function clearEditor() {tapCount = 0;saveCounter = 0;canSave = false;- post('clearEditor');- post('clearTitle');- post("clearHistory");- post('blur');+ post('reset');}function checkIfContentIsSavable() {@@ -250,6 +247,7 @@ export async function saveNote(lockNote = true) {}let n = db.notes.note(id).data.dateEdited;post('dateEdited', timeConverter(n));+post('saving', 'Saved');}@@ -261,9 +259,9 @@ export function onWebViewLoad(noMenu, premium, colors) {} else {post('focusTitle');}- let c = {...colors};- c.factor = normalize(1);- post('theme', c);+ let theme = {...colors};+ theme.factor = normalize(1);+ post('theme', theme);setTimeout(() => {Platform.OS === 'android' ? EditorWebView.current?.requestFocus() : null;post('blur');@@ -301,5 +299,5 @@ const updateEditor = async () => {} else {post('text', content.text);}- post("clearHistory");+ post('clearHistory');};diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.jsindex 1c97efe38..3f088427c 100755--- a/apps/mobile/src/views/Editor/index.js+++ b/apps/mobile/src/views/Editor/index.js@@ -5,17 +5,19 @@ import {Platform,SafeAreaView,StatusBar,- TouchableOpacity,View,} from 'react-native';-import Icon from 'react-native-vector-icons/MaterialCommunityIcons';import WebView from 'react-native-webview';-import {normalize, SIZE} from '../../common/common';+import {normalize} from '../../common/common';+import {ActionIcon} from '../../components/ActionIcon';import {ActionSheetEvent,simpleDialogEvent,} from '../../components/DialogManager/recievers';-import {TEMPLATE_EXIT_FULLSCREEN} from '../../components/DialogManager/templates';+import {+ TEMPLATE_EXIT_FULLSCREEN,+ TEMPLATE_NEW_NOTE,+} from '../../components/DialogManager/templates';import {useTracked} from '../../provider';import {eSendEvent,@@ -31,8 +33,10 @@ import {import {exitEditorAnimation} from '../../utils/animations';import {DDS, editing, ToastEvent} from '../../utils/utils';import {+ checkNote,clearEditor,EditorWebView,+ getNote,injectedJS,loadNote,onWebViewLoad,@@ -40,10 +44,7 @@ import {sourceUri,_onMessage,_onShouldStartLoadWithRequest,- checkNote,- getNote,} from './func';-import {ActionIcon} from '../../components/ActionIcon';var handleBack;var tapCount = 0;@@ -190,6 +191,13 @@ const Editor = ({noMenu}) => {style={{flexDirection: 'row',}}>+ <ActionIcon+ name="plus"+ color={colors.heading}+ onPress={() => {+ simpleDialogEvent(TEMPLATE_NEW_NOTE);+ }}+ />{DDS.isTab && !fullscreen ? (<ActionIconname="fullscreen"