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
bump version
ammarahm-ed282b7c988bf7
diff --git a/apps/mobile/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xmlindex f68898726..cca909325 100644--- a/apps/mobile/android/app/src/main/AndroidManifest.xml+++ b/apps/mobile/android/app/src/main/AndroidManifest.xml@@ -68,11 +68,12 @@<activity android:exported="false" android:name="com.facebook.react.devsupport.DevSettingsActivity" /><activityandroid:name=".ShareActivity"- android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"+ android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"android:label="@string/title_activity_share"android:noHistory="true"android:screenOrientation="unspecified"android:exported="true"+ android:windowSoftInputMode="adjustResize"android:theme="@style/AppThemeB"><intent-filter android:label="Make Note"><action android:name="android.intent.action.SEND" />diff --git a/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj b/apps/mobile/ios/Notesnook.xcodeproj/project.pbxprojindex aaa3d0be0..62e27970c 100644--- a/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj+++ b/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj@@ -1118,7 +1118,7 @@CODE_SIGN_IDENTITY = "Apple Development";"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 1713;+ CURRENT_PROJECT_VERSION = 1714;DEVELOPMENT_TEAM = 53CWBG3QUC;ENABLE_BITCODE = NO;GCC_GENERATE_DEBUGGING_SYMBOLS = YES;@@ -1191,7 +1191,7 @@"$(inherited)","@executable_path/Frameworks",);- MARKETING_VERSION = 1.7.12;+ MARKETING_VERSION = 1.7.13;OTHER_LDFLAGS = ("$(inherited)","-ObjC",@@ -1219,7 +1219,7 @@CODE_SIGN_ENTITLEMENTS = Notesnook/Notesnook.entitlements;CODE_SIGN_IDENTITY = "iPhone Distribution";CODE_SIGN_STYLE = Manual;- CURRENT_PROJECT_VERSION = 1713;+ CURRENT_PROJECT_VERSION = 1714;DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_GENERATE_DEBUGGING_SYMBOLS = YES;HEADER_SEARCH_PATHS = (@@ -1291,7 +1291,7 @@"$(inherited)","@executable_path/Frameworks",);- MARKETING_VERSION = 1.7.12;+ MARKETING_VERSION = 1.7.13;ONLY_ACTIVE_ARCH = NO;OTHER_LDFLAGS = ("$(inherited)",@@ -1449,7 +1449,7 @@CODE_SIGN_IDENTITY = "Apple Development";"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 1713;+ CURRENT_PROJECT_VERSION = 1714;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;@@ -1460,7 +1460,7 @@"@executable_path/Frameworks","@executable_path/../../Frameworks",);- MARKETING_VERSION = 1.7.12;+ MARKETING_VERSION = 1.7.13;MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;@@ -1490,7 +1490,7 @@CODE_SIGN_IDENTITY = "iPhone Distribution";CODE_SIGN_STYLE = Manual;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 1713;+ CURRENT_PROJECT_VERSION = 1714;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;@@ -1501,7 +1501,7 @@"@executable_path/Frameworks","@executable_path/../../Frameworks",);- MARKETING_VERSION = 1.7.12;+ MARKETING_VERSION = 1.7.13;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;PRODUCT_NAME = "$(TARGET_NAME)";@@ -1530,7 +1530,7 @@CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";CODE_SIGN_IDENTITY = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 1713;+ CURRENT_PROJECT_VERSION = 1714;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;@@ -1603,7 +1603,7 @@"@executable_path/Frameworks","@executable_path/../../Frameworks",);- MARKETING_VERSION = 1.7.12;+ MARKETING_VERSION = 1.7.13;MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;@@ -1633,7 +1633,7 @@CODE_SIGN_IDENTITY = "iPhone Distribution";CODE_SIGN_STYLE = Manual;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 1713;+ CURRENT_PROJECT_VERSION = 1714;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;@@ -1706,7 +1706,7 @@"@executable_path/Frameworks","@executable_path/../../Frameworks",);- MARKETING_VERSION = 1.7.12;+ MARKETING_VERSION = 1.7.13;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;PRODUCT_NAME = "$(TARGET_NAME)";diff --git a/apps/mobile/share/index.js b/apps/mobile/share/index.jsindex aed5c9332..78e61b1f4 100644--- a/apps/mobile/share/index.js+++ b/apps/mobile/share/index.js@@ -1,22 +1,25 @@import Clipboard from '@react-native-clipboard/clipboard';import { getLinkPreview } from 'link-preview-js';import { HTMLRootElement } from 'node-html-parser/dist/nodes/html';-import React, { useEffect, useRef, useState } from 'react';+import React, { Fragment, useEffect, useRef, useState } from 'react';import {ActivityIndicator,Alert,Keyboard,KeyboardAvoidingView,+ Modal,+ NativeModules,Platform,SafeAreaView,ScrollView,StatusBar,Text,TouchableOpacity,+ UIManager,useWindowDimensions,View} from 'react-native';-import Animated, { Easing, timing, useValue } from 'react-native-reanimated';+import Animated, { acc, Easing, timing, useValue } from 'react-native-reanimated';import { useSafeAreaInsets } from 'react-native-safe-area-context';import Icon from 'react-native-vector-icons/MaterialCommunityIcons';import WebView from 'react-native-webview';@@ -213,6 +216,7 @@ const NotesnookShare = ({ quicknote = false }) => {const insets = Platform.OS === 'android' ? { top: StatusBar.currentHeight } : useSafeAreaInsets();const prevAnimation = useRef(null);const [showSearch, setShowSearch] = useState(false);+ const [kh, setKh] = useState(0);const animate = (opacityV, translateV) => {prevAnimation.current = translateV;@@ -232,10 +236,14 @@ const NotesnookShare = ({ quicknote = false }) => {const onKeyboardDidShow = event => {let kHeight = event.endCoordinates.height;keyboardHeight.current = kHeight;+ setKh(kHeight);+ console.log('keyboard show/hide');};const onKeyboardDidHide = () => {keyboardHeight.current = 0;+ setKh(0);+ console.log('keyboard hide');};useEffect(() => {@@ -466,33 +474,89 @@ const NotesnookShare = ({ quicknote = false }) => {}};+ const Outer = Platform.OS === 'android' ? Modal : Fragment;++ const outerProps =+ Platform.OS === 'android'+ ? {+ animationType: 'fade',+ transparent: true,+ visible: true+ }+ : {};+return (- <AnimatedSAV- style={{- width: width > 500 ? 500 : width,- height: height,- opacity: Platform.OS !== 'ios' ? opacity : 1,- alignSelf: 'center'- }}- >- {quicknote && !showSearch ? (- <View- style={{- width: '100%',- backgroundColor: colors.bg,- height: 50 + insets.top,- paddingTop: insets.top,- ...getElevation(1),- marginTop: -insets.top,- flexDirection: 'row',- alignItems: 'center',- justifyContent: 'space-between'- }}- >- <Button- type="action"- icon="close"- iconColor={colors.pri}+ <Outer {...outerProps}>+ <AnimatedSAV+ style={{+ width: width > 500 ? 500 : width,+ height: height - kh,+ opacity: Platform.OS !== 'ios' ? opacity : 1,+ alignSelf: 'center',+ justifyContent: 'flex-end'+ }}+ >+ {quicknote && !showSearch ? (+ <View+ style={{+ width: '100%',+ backgroundColor: colors.bg,+ height: 50 + insets.top,+ paddingTop: insets.top,+ ...getElevation(1),+ marginTop: -insets.top,+ flexDirection: 'row',+ alignItems: 'center',+ justifyContent: 'space-between'+ }}+ >+ <Button+ type="action"+ icon="close"+ iconColor={colors.pri}+ onPress={() => {+ if (showSearch) {+ console.log('hide search');+ setShowSearch(false);+ animate(1, 0);+ } else {+ close();+ }+ }}+ style={{+ width: 50,+ height: 50,+ marginBottom: 0+ }}+ iconSize={25}+ />++ <Text+ style={{+ color: colors.pri,+ fontSize: 17,+ fontFamily: 'OpenSans-Regular'+ }}+ >+ Quick note+ </Text>++ <Button+ type="action"+ icon="check"+ iconColor={accent.color}+ onPress={onPress}+ style={{+ width: 50,+ height: 50,+ marginBottom: 0+ }}+ iconSize={25}+ />+ </View>+ ) : (+ <TouchableOpacity+ activeOpacity={1}onPress={() => {if (showSearch) {console.log('hide search');@@ -503,300 +567,257 @@ const NotesnookShare = ({ quicknote = false }) => {}}}style={{- width: 50,- height: 50,- marginBottom: 0- }}- iconSize={25}- />-- <Text- style={{- color: colors.pri,- fontSize: 17,- fontFamily: 'OpenSans-Regular'+ width: '100%',+ height: '100%',+ position: 'absolute'}}>- Quick note- </Text>-- <Button- type="action"- icon="check"- iconColor={accent.color}- onPress={onPress}- style={{- width: 50,- height: 50,- marginBottom: 0- }}- iconSize={25}- />- </View>- ) : (- <TouchableOpacity- activeOpacity={1}- onPress={() => {- if (showSearch) {- console.log('hide search');+ <View+ style={{+ width: '100%',+ height: '100%',+ backgroundColor: 'white',+ opacity: 0.01+ }}+ />+ <View />+ </TouchableOpacity>+ )}++ {showSearch ? (+ <Search+ quicknote={quicknote}+ getKeyboardHeight={() => keyboardHeight.current}+ close={() => {setShowSearch(false);animate(1, 0);- } else {- close();- }- }}- style={{- width: '100%',- height: '100%',- position: 'absolute'- }}- >- <View- style={{- width: '100%',- height: '100%',- backgroundColor: 'white',- opacity: 0.01}}/>- <View />- </TouchableOpacity>- )}-- {showSearch ? (- <Search- quicknote={quicknote}- getKeyboardHeight={() => keyboardHeight.current}- close={() => {- setShowSearch(false);- animate(1, 0);- }}- />- ) : null}+ ) : null}- <AnimatedKAV- enabled={!floating}- onLayout={event => {- if (prevAnimation.current === 0) return;- translate.setValue(event.nativeEvent.layout.height + 30);- }}- style={{- paddingVertical: 25,- backgroundColor: 'transparent',- marginBottom: insets.top,- display: showSearch ? 'none' : 'flex'- }}- behavior={Platform.OS === 'ios' ? 'padding' : null}- ><Viewstyle={{- maxHeight: '100%',- paddingHorizontal: 12+ paddingVertical: 25,+ backgroundColor: 'transparent',+ marginBottom: insets.top,+ display: showSearch ? 'none' : 'flex'}}>- <ScrollView- horizontal- contentContainerStyle={{- alignItems: 'center',- height: 45- }}+ <Viewstyle={{- width: '100%',- height: 35,- borderRadius: 10,- flexDirection: 'row'+ maxHeight: '100%',+ paddingHorizontal: 12}}>- <Button- color={appendNote ? colors.nav : accent.color}- onPress={() => {- useShareStore.getState().setAppendNote(null);- }}- icon="plus"- iconSize={18}- iconColor={!appendNote ? colors.light : colors.icon}- title="Create new note"- textColor={!appendNote ? colors.light : colors.icon}- type="rounded"- textStyle={{- fontSize: 13- }}- style={{- paddingHorizontal: 12,- ...getElevation(1),- height: 35- }}- />-- <Button- color={!appendNote ? colors.nav : accent.color}- onPress={() => {- setShowSearch(true);- animate(1, 1000);- }}- icon="text-short"- iconSize={18}- iconColor={appendNote ? colors.light : colors.icon}- title={`${appendNote ? appendNote.title.slice(0, 25) : 'Append to note'}`}- textColor={appendNote ? colors.light : colors.icon}- type="rounded"- textStyle={{- fontSize: 13+ <ScrollView+ horizontal+ contentContainerStyle={{+ alignItems: 'center',+ height: 50}}style={{- paddingHorizontal: 12,- ...getElevation(1),- height: 35+ width: '100%',+ height: 50,+ borderRadius: 10,+ flexDirection: 'row',+ bottom: -10}}- />- </ScrollView>+ >+ <Button+ color={colors.nav}+ onPress={() => {+ useShareStore.getState().setAppendNote(null);+ }}+ icon="plus"+ iconSize={18}+ iconColor={!appendNote ? accent.color : colors.icon}+ title="New note"+ textColor={!appendNote ? accent.color : colors.icon}+ type="rounded"+ textStyle={{+ fontSize: 13+ }}+ style={{+ paddingHorizontal: 12,+ ...getElevation(1),+ height: 35+ }}+ />- <View- style={{- width: '100%'- }}- >- {!quicknote ? (<Button- color={accent.color}- onPress={onPress}- loading={loading || loadingIntent}- icon="check"- iconSize={22}- iconColor={colors.light}+ color={colors.nav}+ onPress={() => {+ setShowSearch(true);+ animate(1, 1000);+ }}+ icon="text-short"+ iconSize={18}+ iconColor={appendNote ? accent.color : colors.icon}+ title={`${appendNote ? appendNote.title.slice(0, 25) : 'Append to note'}`}+ textColor={appendNote ? accent.color : colors.icon}+ type="rounded"+ textStyle={{+ fontSize: 13+ }}style={{- position: 'absolute',- zIndex: 999,- ...getElevation(10),- right: 24,- bottom: -25,- paddingHorizontal: 24,- height: 35,- borderRadius: 100+ paddingHorizontal: 12,+ ...getElevation(1),+ height: 35}}/>- ) : null}+ </ScrollView><Viewstyle={{- marginTop: 10,- minHeight: 100,- borderRadius: 10,- ...getElevation(quicknote ? 1 : 5),- backgroundColor: colors.bg,- overflow: 'hidden'+ width: '100%'}}><Viewstyle={{- width: '100%',- height: height * 0.25,- paddingBottom: 15,- borderRadius: 10+ marginTop: 10,+ minHeight: 100,+ borderRadius: 10,+ ...getElevation(quicknote ? 1 : 5),+ backgroundColor: colors.bg,+ overflow: 'hidden'}}>- <WebView- onLoad={onLoad}- ref={webviewRef}+ <Viewstyle={{width: '100%',- height: '100%',- borderRadius: 10,- backgroundColor: 'transparent'+ height: height * 0.3,+ paddingBottom: 15,+ borderRadius: 10}}- cacheMode="LOAD_DEFAULT"- domStorageEnabled={true}- scrollEnabled={true}- bounces={false}- allowFileAccess={true}- scalesPageToFit={true}- allowingReadAccessToURL={Platform.OS === 'android' ? true : null}- onMessage={onMessage}- onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}- allowFileAccessFromFileURLs={true}- allowUniversalAccessFromFileURLs={true}- originWhitelist={['*']}- javaScriptEnabled={true}- cacheEnabled={true}- source={- Platform.OS === 'ios'- ? { uri: sourceUri }- : {- uri: 'file:///android_asset/plaineditor.html',- baseUrl: 'file:///android_asset/'- }- }- />- </View>+ >+ <WebView+ onLoad={onLoad}+ ref={webviewRef}+ style={{+ width: '100%',+ height: '100%',+ borderRadius: 10,+ backgroundColor: 'transparent'+ }}+ cacheMode="LOAD_DEFAULT"+ domStorageEnabled={true}+ scrollEnabled={true}+ bounces={false}+ allowFileAccess={true}+ scalesPageToFit={true}+ allowingReadAccessToURL={Platform.OS === 'android' ? true : null}+ onMessage={onMessage}+ onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}+ allowFileAccessFromFileURLs={true}+ allowUniversalAccessFromFileURLs={true}+ originWhitelist={['*']}+ javaScriptEnabled={true}+ cacheEnabled={true}+ source={+ Platform.OS === 'ios'+ ? { uri: sourceUri }+ : {+ uri: 'file:///android_asset/plaineditor.html',+ baseUrl: 'file:///android_asset/'+ }+ }+ />+ </View>++ {appendNote ? (+ <Text+ style={{+ fontSize: 12,+ color: colors.icon,+ fontFamily: 'OpenSans-Regular',+ paddingHorizontal: 12,+ marginBottom: 10,+ flexWrap: 'wrap'+ }}+ >+ Above content will append to{' '}+ <Text+ style={{+ color: accent.color,+ fontFamily: 'OpenSans-SemiBold'+ }}+ >+ "{appendNote.title}"+ </Text>{' '}+ . Click on "New note" to create a new note.+ </Text>+ ) : null}- {appendNote ? (- <Text+ <Viewstyle={{- fontSize: 11,- color: colors.gray,- fontFamily: 'OpenSans-Regular',+ flexDirection: 'row',paddingHorizontal: 12,- marginBottom: 10,- flexWrap: 'wrap'+ alignItems: 'flex-end',+ justifyContent: 'space-between',+ width: '100%'}}>- This shared note will be appended to{' '}- <Text+ <Viewstyle={{- color: accent.color,- fontFamily: 'OpenSans-SemiBold'+ flexDirection: 'row'}}>- "{appendNote.title}"- </Text>{' '}- . Click on "Create new note" to add to a new note instead.- </Text>- ) : null}-- <View- style={{- flexDirection: 'row',- paddingHorizontal: 12,- paddingRight: 80,- alignItems: 'center'- }}- >- {rawData.value && isURL(rawData.value) ? (- <Button- color={mode == 2 ? colors.shade : colors.nav}- icon={modes[2].icon}- onPress={() => changeMode(2)}- title={modes[2].title}- iconSize={18}- iconColor={mode == 2 ? accent.color : colors.icon}- textColor={mode == 2 ? accent.color : colors.icon}- type="rounded"- style={{ paddingHorizontal: 12 }}- />- ) : null}- <Button- color={mode == 1 ? colors.shade : colors.nav}- icon={modes[1].icon}- onPress={() => changeMode(1)}- title={modes[1].title}- iconSize={18}- iconColor={mode == 1 ? accent.color : colors.icon}- textColor={mode == 1 ? accent.color : colors.icon}- type="rounded"- style={{ paddingHorizontal: 12 }}- />+ {rawData.value && isURL(rawData.value) ? (+ <Button+ color={mode == 2 ? colors.shade : colors.nav}+ icon={modes[2].icon}+ onPress={() => changeMode(2)}+ title={modes[2].title}+ iconSize={18}+ iconColor={mode == 2 ? accent.color : colors.icon}+ textColor={mode == 2 ? accent.color : colors.icon}+ type="rounded"+ style={{ paddingHorizontal: 12 }}+ />+ ) : null}+ <Button+ color={mode == 1 ? colors.shade : colors.nav}+ icon={modes[1].icon}+ onPress={() => changeMode(1)}+ title={modes[1].title}+ iconSize={18}+ iconColor={mode == 1 ? accent.color : colors.icon}+ textColor={mode == 1 ? accent.color : colors.icon}+ type="rounded"+ style={{ paddingHorizontal: 12 }}+ />+ </View>++ {!quicknote ? (+ <Button+ color={accent.color}+ onPress={onPress}+ loading={loading || loadingIntent}+ icon="check"+ iconSize={20}+ iconColor={colors.light}+ style={{+ paddingHorizontal: 0,+ height: 40,+ width: 40,+ borderRadius: 100,+ minWidth: 0+ }}+ />+ ) : null}+ </View></View></View>- </View>- <View- style={{- height: Platform.isPad ? 150 : Platform.OS === 'ios' ? 110 : 40- }}- />+ <View+ style={{+ height: Platform.isPad ? 150 : Platform.OS === 'ios' ? 110 : 0+ }}+ />+ </View></View>- </AnimatedKAV>- </AnimatedSAV>+ </AnimatedSAV>+ </Outer>);};diff --git a/apps/mobile/share/search.js b/apps/mobile/share/search.jsindex 6b7f4c1bb..849578dda 100644--- a/apps/mobile/share/search.js+++ b/apps/mobile/share/search.js@@ -118,7 +118,7 @@ export const Search = ({ close, getKeyboardHeight, quicknote }) => {backgroundColor: colors.bg,borderRadius: quicknote ? 0 : 10,width: quicknote ? '100%' : '95%',- minHeight: 50,+ minHeight: 250,alignSelf: 'center',overflow: 'hidden',zIndex: 999,@@ -183,7 +183,9 @@ export const Search = ({ close, getKeyboardHeight, quicknote }) => {color: colors.icon}}>- Search for a note to append to it.+ {searchKeyword.current+ ? `No results found for "${searchKeyword.current}"`+ : `Search for a note to append to it.`}</Text></View>}diff --git a/apps/mobile/version.js b/apps/mobile/version.jsindex ab2342807..a08fbd13c 100644--- a/apps/mobile/version.js+++ b/apps/mobile/version.js@@ -1 +1 @@-export const APP_VERSION=1712;\ No newline at end of file+export const APP_VERSION=1713;\ No newline at end of file