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
ui fixes
ammarahm-ed302747442ef6
diff --git a/apps/mobile/App.js b/apps/mobile/App.jsindex 2a2552df3..6919b90a4 100644--- a/apps/mobile/App.js+++ b/apps/mobile/App.js@@ -315,7 +315,7 @@ const App = () => {close={() => sideMenuRef.openMenu(!sideMenuRef.isOpen)}/>}- openMenuOffset={w / 1.3}>+ openMenuOffset={w / 1.5}><AppContainerstyle={{width: DDS.isTab ? '70%' : '100%',diff --git a/apps/mobile/src/components/ListPlaceholders/index.js b/apps/mobile/src/components/ListPlaceholders/index.jsindex 0b82a9766..92ea75157 100644--- a/apps/mobile/src/components/ListPlaceholders/index.js+++ b/apps/mobile/src/components/ListPlaceholders/index.js@@ -654,6 +654,24 @@ export const FavoritesPlaceHolder = ({colors, animation}) => {alignSelf: 'center',justifyContent: 'space-around',}}>+ <Animatable.View+ animation={slideRight}+ iterationCount="infinite"+ duration={5000}+ delay={3000}+ iterationDelay={1000}+ direction="normal"+ easing="ease-in"+ useNativeDriver={true}+ style={{+ padding: 5,+ borderRadius: 5,+ marginBottom: 10,+ marginTop: -30,+ }}>+ <Icon name="star" size={SIZE.xl} color="orange" />+ </Animatable.View>+<Animatable.Viewanimation={slideRight}iterationCount="infinite"@@ -704,6 +722,24 @@ export const FavoritesPlaceHolder = ({colors, animation}) => {}}><Icon name="star" size={SIZE.xl} color="orange" /></Animatable.View>++ <Animatable.View+ animation={slideRight}+ iterationCount="infinite"+ duration={5000}+ delay={3000}+ iterationDelay={1000}+ direction="normal"+ easing="ease-in"+ useNativeDriver={true}+ style={{+ padding: 5,+ borderRadius: 5,+ marginBottom: 10,+ marginTop: -30,+ }}>+ <Icon name="star" size={SIZE.xl} color="orange" />+ </Animatable.View></View>);};diff --git a/apps/mobile/src/components/Menu/index.js b/apps/mobile/src/components/Menu/index.jsindex 0e4ad71ed..26dc02459 100644--- a/apps/mobile/src/components/Menu/index.js+++ b/apps/mobile/src/components/Menu/index.js@@ -1,16 +1,16 @@-import React, {useEffect, useState} from 'react';+import React, {useEffect} from 'react';import {Platform,+ SafeAreaView,ScrollView,StatusBar,Text,TouchableOpacity,View,- SafeAreaView,} from 'react-native';import FastStorage from 'react-native-fast-storage';import Icon from 'react-native-vector-icons/Feather';-import {db, DDS} from '../../../App';+import {DDS} from '../../../App';import {ACCENT,COLOR_SCHEME,@@ -32,7 +32,6 @@ import {eSendSideMenuOverlayRef,} from '../../services/events';import NavigationService from '../../services/NavigationService';-import {AnimatedSafeAreaView} from '../../views/Home';export const Menu = ({close = () => {},@@ -53,14 +52,9 @@ export const Menu = ({dispatch({type: ACTIONS.THEME, colors: newColors});}- /* useEffect(() => {- let allTags = tags;- allTags.sort((a, b) => {- return a.count > b.count;- });-- setTags([...allTags]);- }, []); */+ useEffect(() => {+ dispatch({type: ACTIONS.TAGS});+ }, []);const listItems = [{@@ -139,7 +133,7 @@ export const Menu = ({minHeight: 2,width: '100%',paddingHorizontal: noTextMode ? 0 : 12,- height: 50,+ height: DDS.isTab ? 50 : 0,marginBottom: 0,alignItems: 'center',flexDirection: 'row',@@ -153,7 +147,7 @@ export const Menu = ({: 0: StatusBar.currentHeight,}}>- {noTextMode ? null : (+ {noTextMode || !DDS.isTab ? null : (<Textstyle={{fontSize: SIZE.xxl,@@ -215,233 +209,232 @@ export const Menu = ({}}showsVerticalScrollIndicator={false}><View>- <View>- {listItems.map((item, index) => (- <TouchableOpacity- key={item.name}- activeOpacity={opacity / 2}- onPress={() => {- item.close === false ? null : close();+ {listItems.map((item, index) => (+ <TouchableOpacity+ key={item.name}+ activeOpacity={opacity / 2}+ onPress={() => {+ item.close === false ? null : close();- item.func();- }}+ item.func();+ }}+ style={{+ width: '100%',+ alignSelf: 'center',+ flexDirection: 'row',+ justifyContent: noTextMode ? 'center' : 'space-between',+ alignItems: 'center',+ paddingBottom: noTextMode ? pv + 2 : normalize(15),+ paddingTop:+ index === 0 ? pv : noTextMode ? pv + 2 : normalize(15),+ }}>+ <Viewstyle={{- width: '100%',- alignSelf: 'center',flexDirection: 'row',- justifyContent: noTextMode ? 'center' : 'space-between',alignItems: 'center',- paddingBottom: noTextMode ? pv + 2 : normalize(15),- paddingTop:- index === 0 ? pv : noTextMode ? pv + 2 : normalize(15),}}>- <View+ <Iconstyle={{- flexDirection: 'row',- alignItems: 'center',- }}>- <Icon+ minWidth: noTextMode ? 5 : 30,+ }}+ name={item.icon}+ color={colors.accent}+ size={SIZE.md}+ />+ {noTextMode ? null : (+ <Textstyle={{- minWidth: noTextMode ? 5 : 30,- }}- name={item.icon}- color={colors.pri}- size={SIZE.md}- />- {noTextMode ? null : (- <Text- style={{- fontFamily: WEIGHT.regular,- fontSize: SIZE.sm,- color: colors.pri,- }}>- {item.name}- </Text>- )}- </View>-- {item.switch && !noTextMode ? (- <Icon- size={SIZE.lg}- color={item.on ? colors.accent : colors.icon}- name={item.on ? 'toggle-right' : 'toggle-left'}- />- ) : (- undefined+ fontFamily: WEIGHT.regular,+ fontSize: SIZE.sm,+ color: colors.pri,+ }}>+ {item.name}+ </Text>)}- </TouchableOpacity>- ))}- </View>+ </View>- <TouchableOpacity- activeOpacity={opacity / 2}- onPress={() => {- close();- NavigationService.navigate('Tags');- }}+ {item.switch && !noTextMode ? (+ <Icon+ size={SIZE.lg}+ color={item.on ? colors.accent : colors.icon}+ name={item.on ? 'toggle-right' : 'toggle-left'}+ />+ ) : (+ undefined+ )}+ </TouchableOpacity>+ ))}+ </View>++ <TouchableOpacity+ activeOpacity={opacity / 2}+ onPress={() => {+ close();+ NavigationService.navigate('Tags');+ }}+ style={{+ width: '100%',+ alignSelf: 'center',+ flexDirection: 'row',+ justifyContent: noTextMode ? 'center' : 'space-between',+ alignItems: 'flex-end',+ marginTop: noTextMode ? pv : normalize(15),+ }}>+ <Viewstyle={{- width: '100%',- alignSelf: 'center',flexDirection: 'row',- justifyContent: noTextMode ? 'center' : 'space-between',- alignItems: 'flex-end',- marginTop: noTextMode ? pv : normalize(15),+ justifyContent: noTextMode ? 'center' : 'flex-start',+ alignItems: 'center',}}>- <View+ <Iconstyle={{- flexDirection: 'row',- justifyContent: noTextMode ? 'center' : 'flex-start',- alignItems: 'center',- }}>- <Icon+ minWidth: noTextMode ? 5 : 30,+ }}+ name="tag"+ color={colors.accent}+ size={SIZE.md}+ />+ {noTextMode ? null : (+ <Textstyle={{- minWidth: noTextMode ? 5 : 30,- }}- name="tag"- color={colors.pri}- size={SIZE.md}- />- {noTextMode ? null : (- <Text- style={{- fontFamily: WEIGHT.regular,- fontSize: SIZE.sm,- color: colors.pri,- }}>- Tags- </Text>- )}- </View>- </TouchableOpacity>-- {noTextMode ? null : (- <View- style={{- flexDirection: 'row',- flexWrap: 'wrap',- marginBottom: 0,- }}>- {tags.map(item => (- <TouchableOpacity- key={item.title}- activeOpacity={opacity / 2}- onPress={() => {- close();- NavigationService.navigate('Notes', {- title: item.title,- tag: item,- type: 'tag',- });- }}- style={{- flexDirection: 'row',- justifyContent: 'flex-start',- alignItems: 'center',- padding: 5,- paddingLeft: 2.5,- marginTop: 5,- }}>- <Text- style={{- fontFamily: WEIGHT.regular,- fontSize: SIZE.xs + 1,- color: colors.accent,- }}>- #- </Text>- <Text- style={{- fontFamily: WEIGHT.regular,- fontSize: SIZE.xs + 1,- color: colors.icon,- }}>- {item.title}- </Text>- {item.count > 1 ? (- <Text- style={{- color: 'white',- backgroundColor: colors.accent,- fontSize: SIZE.xxs - 2,- minWidth: 10,- minHeight: 10,- marginTop: -10,- borderRadius: 2,- textAlign: 'center',- padding: 0,- paddingHorizontal: 1,- }}>- {item.count}- </Text>- ) : null}- </TouchableOpacity>- ))}- </View>- )}+ fontFamily: WEIGHT.regular,+ fontSize: SIZE.sm,+ color: colors.pri,+ }}>+ Tags+ </Text>+ )}+ </View>+ </TouchableOpacity>+ {noTextMode ? null : (<Viewstyle={{- flexDirection: noTextMode ? 'column' : 'row',- flexWrap: noTextMode ? 'nowrap' : 'wrap',- marginTop: pv / 2,- marginBottom: pv / 2,+ flexDirection: 'row',+ flexWrap: 'wrap',+ marginBottom: 0,}}>- {colorNotes.map(item => (+ {tags.map(item => (<TouchableOpacity- key={item.id}+ key={item.title}activeOpacity={opacity / 2}onPress={() => {+ close();NavigationService.navigate('Notes', {- type: 'color',title: item.title,- color: item,+ tag: item,+ type: 'tag',});}}style={{flexDirection: 'row',- justifyContent: noTextMode ? 'center' : 'flex-start',+ justifyContent: 'flex-start',alignItems: 'center',- margin: noTextMode ? 0 : 5,- marginLeft: 0,- marginRight: noTextMode ? 0 : 15,- marginTop: normalize(15),+ padding: 5,+ paddingLeft: 2.5,+ marginTop: 5,}}>- <View+ <Textstyle={{- width: noTextMode ? SIZE.md : normalize(30),- height: noTextMode ? SIZE.md : normalize(30),- backgroundColor: item.title,- borderRadius: 100,- }}></View>+ fontFamily: WEIGHT.regular,+ fontSize: SIZE.xs + 1,+ color: colors.accent,+ }}>+ #+ </Text><Textstyle={{- color: colors.pri,- fontSize: SIZE.xxs - 2,- minWidth: 12,- minHeight: 12,- borderWidth: 0.5,- paddingHorizontal: 2,- borderColor: item.title,- borderRadius: 100,- textAlign: 'center',- position: 'absolute',- bottom: -5,- right:- item.count < 10- ? -6- : item.count >= 10 && item.count < 100- ? -9- : item.count >= 100 && item.count < 1000- ? -11- : item.count > 1000- ? -14- : -8,+ fontFamily: WEIGHT.regular,+ fontSize: SIZE.xs + 1,+ color: colors.icon,}}>- {item.count}+ {item.title}</Text>+ {item.count > 1 ? (+ <Text+ style={{+ color: 'white',+ backgroundColor: colors.accent,+ fontSize: SIZE.xxs - 2,+ minWidth: 10,+ minHeight: 10,+ marginTop: -10,+ borderRadius: 2,+ textAlign: 'center',+ padding: 0,+ paddingHorizontal: 1,+ }}>+ {item.count}+ </Text>+ ) : null}</TouchableOpacity>))}</View>+ )}++ <View+ style={{+ flexDirection: noTextMode ? 'column' : 'row',+ flexWrap: noTextMode ? 'nowrap' : 'wrap',+ marginTop: pv / 2,+ marginBottom: pv / 2,+ }}>+ {colorNotes.map(item => (+ <TouchableOpacity+ key={item.id}+ activeOpacity={opacity / 2}+ onPress={() => {+ NavigationService.navigate('Notes', {+ type: 'color',+ title: item.title,+ color: item,+ });+ close();+ }}+ style={{+ flexDirection: 'row',+ justifyContent: noTextMode ? 'center' : 'flex-start',+ alignItems: 'center',+ margin: noTextMode ? 0 : 5,+ marginLeft: 0,+ marginRight: noTextMode ? 0 : 15,+ marginTop: normalize(15),+ }}>+ <View+ style={{+ width: noTextMode ? SIZE.md : normalize(30),+ height: noTextMode ? SIZE.md : normalize(30),+ backgroundColor: item.title,+ borderRadius: 100,+ }}></View>+ <Text+ style={{+ color: colors.pri,+ fontSize: SIZE.xxs - 2,+ minWidth: 12,+ minHeight: 12,+ borderWidth: 0.5,+ paddingHorizontal: 2,+ borderColor: item.title,+ borderRadius: 100,+ textAlign: 'center',+ position: 'absolute',+ bottom: -5,+ right:+ item.count < 10+ ? -6+ : item.count >= 10 && item.count < 100+ ? -9+ : item.count >= 100 && item.count < 1000+ ? -11+ : item.count > 1000+ ? -14+ : -8,+ }}>+ {item.count}+ </Text>+ </TouchableOpacity>+ ))}</View>{/* <Viewdiff --git a/apps/mobile/src/components/SearchInput/index.js b/apps/mobile/src/components/SearchInput/index.jsindex e5583c864..72d8142e0 100644--- a/apps/mobile/src/components/SearchInput/index.js+++ b/apps/mobile/src/components/SearchInput/index.js@@ -73,7 +73,7 @@ export const Search = props => {color: colors.pri,maxWidth: '85%',width: '85%',- fontSize: SIZE.md,+ fontSize: SIZE.sm,}}onChangeText={props.onChangeText}onSubmitEditing={props.onSubmitEditing}diff --git a/apps/mobile/src/services/NavigationService.js b/apps/mobile/src/services/NavigationService.jsindex c9ddba7fd..7a499bde4 100755--- a/apps/mobile/src/services/NavigationService.js+++ b/apps/mobile/src/services/NavigationService.js@@ -108,6 +108,7 @@ const TopLevelNavigator = createStackNavigator(},{initialRouteName: 'Home',+defaultNavigationOptions: {gesturesEnabled: false,headerStyle: {@@ -116,6 +117,9 @@ const TopLevelNavigator = createStackNavigator(height: 0,},},+ cardOverlayEnabled: false,+ cardShadowEnabled: false,+ animationEnabled: false,transitionConfig: () => ({screenInterpolator: props => {return fade(props);diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.jsindex 2859f8b7c..98048f31a 100755--- a/apps/mobile/src/views/Editor/index.js+++ b/apps/mobile/src/views/Editor/index.js@@ -173,7 +173,6 @@ const Editor = ({navigation, noMenu}) => {});if (id !== rId && !note.locked) {- console.log('HERE_ MESSING UP THINGS');id = rId;note = db.notes.note(id);if (note) {@@ -543,70 +542,58 @@ const Editor = ({navigation, noMenu}) => {}, [colors]);return (- <Animatable.View- animation="fadeIn"- duration={500}- delay={1000}- useNativeDriver={true}+ <AnimatedSafeAreaView+ transition={['backgroundColor', 'width']}+ duration={300}style={{flex: 1,- backgroundColor: 'transparent',+ backgroundColor: DDS.isTab ? 'transparent' : colors.bg,height: '100%',width: '100%',+ flexDirection: 'row',+ justifyContent: 'space-between',}}>- <AnimatedSafeAreaView- transition={['backgroundColor', 'width']}- duration={300}+ <Animatable.View+ transition="opacity"+ useNativeDriver={true}+ duration={150}style={{- flex: 1,- backgroundColor: DDS.isTab ? 'transparent' : colors.bg,- height: '100%',width: '100%',- flexDirection: 'row',- justifyContent: 'space-between',+ height: '100%',+ justifyContent: 'center',+ alignItems: 'center',+ zIndex: 1,+ backgroundColor: colors.bg,+ opacity: loading ? 1 : 0,+ position: 'absolute',}}>- <Animatable.View- transition="opacity"- useNativeDriver={true}- duration={150}- style={{- width: '100%',- height: '100%',- justifyContent: 'center',- alignItems: 'center',- zIndex: 1,- backgroundColor: colors.bg,- opacity: loading ? 1 : 0,- position: 'absolute',- }}>- <ActivityIndicator color={colors.accent} size={SIZE.xxxl} />-- <Text- style={{- color: colors.accent,- fontFamily: WEIGHT.regular,- fontSize: SIZE.md,- marginTop: 10,- }}>- Write with confidence.- </Text>- </Animatable.View>+ <ActivityIndicator color={colors.accent} size={SIZE.xxxl} />- <Animatable.View- transition={['opacity']}- useNativeDriver={true}- duration={3000}- delay={300}+ <Textstyle={{- width: '100%',- height: '100%',- zIndex: 2,- opacity: loading ? 0 : 1,+ color: colors.accent,+ fontFamily: WEIGHT.regular,+ fontSize: SIZE.md,+ marginTop: 10,}}>- {_renderEditor()}- </Animatable.View>- </AnimatedSafeAreaView>- </Animatable.View>+ Write with confidence.+ </Text>+ </Animatable.View>++ <Animatable.View+ transition={['opacity']}+ useNativeDriver={true}+ duration={3000}+ delay={300}+ style={{+ width: '100%',+ height: '100%',+ zIndex: 2,+ opacity: loading ? 0 : 1,+ }}>+ {_renderEditor()}+ </Animatable.View>+ </AnimatedSafeAreaView>);};