Skip to content

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

minor changes

ammarahm-edce5115ece765
diff --git a/apps/mobile/src/components/Button/index.js b/apps/mobile/src/components/Button/index.js
index 4646d084d..b5e73e5a1 100644
--- a/apps/mobile/src/components/Button/index.js
+++ b/apps/mobile/src/components/Button/index.js
@@ -15,18 +15,18 @@ export const Button = ({
icon,
color = 'accent',
fontSize = SIZE.sm,
- iconColor = 'white',
+ iconColor = 'accent',
}) => {
- const [state, dispatch] = useTracked();
+ const [state] = useTracked();
const {colors} = state;
const usedColor = color === 'accent' ? colors.accent : colors[color];
return (
<PressableButton
onPress={onPress}
- color={grayed ? colors.nav : usedColor}
- selectedColor={grayed ? colors.nav : usedColor}
- alpha={grayed ? (!colors.night ? -0.04 : 0.04) : -0.1}
+ color="transparent"
+ selectedColor={grayed ? colors.nav : colors.shade}
+ alpha={grayed ? (!colors.night ? -0.02 : 0.02) : -0.1}
customStyle={{
height: height,
width: width ? width : null,
@@ -43,10 +43,10 @@ export const Button = ({
<Icon
name={icon}
style={{
- marginRight: 5,
+ marginRight: 0,
}}
color={grayed ? colors.icon : colors[iconColor]}
- size={SIZE.lg}
+ size={SIZE.md}
/>
) : null}
<Text
@@ -70,8 +70,9 @@ const styles = StyleSheet.create({
justifyContent: 'center',
},
buttonText: {
- fontFamily: WEIGHT.medium,
+ fontFamily: WEIGHT.bold,
color: 'white',
+ fontSize: SIZE.md,
marginLeft: 5,
},
});
diff --git a/apps/mobile/src/utils/Animations.js b/apps/mobile/src/utils/Animations.js
index ebb016ffd..ddda489dc 100644
--- a/apps/mobile/src/utils/Animations.js
+++ b/apps/mobile/src/utils/Animations.js
@@ -1,48 +1,65 @@
-import Animated, {Easing} from 'react-native-reanimated';
-import {Dimensions} from 'react-native';
-import {editing} from './index';
+import { Dimensions } from 'react-native';
+import Animated, { Easing } from 'react-native-reanimated';
+import { editing } from './index';
const {Value, timing} = Animated;
export const EditorPosition = new Value(0);
export const EditorScale = new Value(1);
export const EditorOpacity = new Value(0);
-export const EditorTranslateY = new Value(
- Dimensions.get('window').height * 2
-);
+export const EditorTranslateY = new Value(Dimensions.get('window').height * 2);
+
+export const anim1 = new Animated.Value(-Dimensions.get('window').height);
+export let animInitialValue = -Dimensions.get('window').height;
+export const opacityAnimSearch = new Animated.Value(1);
+export const setAnimValue = (value) => (animInitialValue = value);
+
+export let currentPage = "main"
+export function searchViewAnimation(translate, opacity,next,duration=150) {
+ currentPage = next
+ timing(anim1, {
+ toValue: translate,
+ duration: duration,
+ easing: Easing.inOut(Easing.ease),
+ }).start();
+ timing(opacityAnimSearch, {
+ toValue: opacity,
+ duration: duration,
+ easing: Easing.in(Easing.ease),
+ }).start();
+}
export function openEditorAnimation() {
- EditorTranslateY.setValue(Dimensions.get('window').height * 0.75);
- EditorOpacity.setValue(0);
-
- editing.currentlyEditing = true;
-
-
- timing(EditorTranslateY, {
- duration: 200,
- toValue: 0,
- easing: Easing.out(Easing.ease),
- }).start();
- timing(EditorOpacity, {
- duration: 150,
- toValue: 1,
- easing: Easing.out(Easing.ease),
- }).start();
+ EditorTranslateY.setValue(Dimensions.get('window').height * 0.75);
+ EditorOpacity.setValue(0);
+
+ editing.currentlyEditing = true;
+
+ timing(EditorTranslateY, {
+ duration: 200,
+ toValue: 0,
+ easing: Easing.out(Easing.ease),
+ }).start();
+ timing(EditorOpacity, {
+ duration: 150,
+ toValue: 1,
+ easing: Easing.out(Easing.ease),
+ }).start();
}
export function exitEditorAnimation() {
- EditorOpacity.setValue(1);
- EditorTranslateY.setValue(0);
- editing.currentlyEditing = false;
-
- timing(EditorOpacity, {
- duration: 150,
- toValue: 0,
- easing: Easing.inOut(Easing.ease),
- }).start();
- timing(EditorTranslateY, {
- duration: 200,
- toValue: Dimensions.get('window').height * 2,
- easing: Easing.inOut(Easing.ease),
- }).start();
+ EditorOpacity.setValue(1);
+ EditorTranslateY.setValue(0);
+ editing.currentlyEditing = false;
+
+ timing(EditorOpacity, {
+ duration: 150,
+ toValue: 0,
+ easing: Easing.inOut(Easing.ease),
+ }).start();
+ timing(EditorTranslateY, {
+ duration: 200,
+ toValue: Dimensions.get('window').height * 2,
+ easing: Easing.inOut(Easing.ease),
+ }).start();
}