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
animate dialogs on open
ammarahm-eddab36aa01039
diff --git a/apps/mobile/src/components/ActionSheetComponent/BouncingView.js b/apps/mobile/src/components/ActionSheetComponent/BouncingView.jsindex 4a4dfc4d2..d5828495a 100644--- a/apps/mobile/src/components/ActionSheetComponent/BouncingView.js+++ b/apps/mobile/src/components/ActionSheetComponent/BouncingView.js@@ -1,14 +1,14 @@import React, { useEffect } from 'react';import Animated, { Easing, timing } from 'react-native-reanimated';-export const BouncingView = ({children}) => {+export const BouncingView = ({children,style,duration=600}) => {const scale = Animated.useValue(0.9);useEffect(() => {scale.setValue(0.9);timing(scale, {toValue: 1,- duration: 600,+ duration:duration,easing: Easing.elastic(1)}).start();return () => {@@ -18,13 +18,13 @@ export const BouncingView = ({children}) => {return (<Animated.View- style={{+ style={[{transform: [{scale: scale}]- }}>+ },style]}>{children}</Animated.View>);diff --git a/apps/mobile/src/components/Dialog/index.js b/apps/mobile/src/components/Dialog/index.jsindex 6242e8cdc..5c7d65848 100644--- a/apps/mobile/src/components/Dialog/index.js+++ b/apps/mobile/src/components/Dialog/index.js@@ -9,7 +9,7 @@ import {ph, pv} from '../../utils/SizeUtils';import {sleep} from '../../utils/TimeUtils';import Input from '../Input';import Seperator from '../Seperator';-import { Toast } from '../Toast';+import {Toast} from '../Toast';import BaseDialog from './base-dialog';import DialogButtons from './dialog-buttons';import DialogHeader from './dialog-header';@@ -48,7 +48,9 @@ export const Dialog = ({context = 'global'}) => {const onPressPositive = async () => {if (dialogInfo.positivePress) {inputRef.current?.blur();- let result = await dialogInfo.positivePress(inputValue || dialogInfo.defaultValue);+ let result = await dialogInfo.positivePress(+ inputValue || dialogInfo.defaultValue+ );if (result === false) {return;}@@ -80,8 +82,7 @@ export const Dialog = ({context = 'global'}) => {maxHeight: 450,borderRadius: 5,backgroundColor: colors.bg,- paddingHorizontal: ph,- paddingVertical: pv+ paddingTop: 12};return (@@ -102,23 +103,29 @@ export const Dialog = ({context = 'global'}) => {icon={dialogInfo.icon}paragraph={dialogInfo.paragraph}paragraphColor={dialogInfo.paragraphColor}+ padding={12}/><Seperator half />{dialogInfo.input && (- <Input- fwdRef={inputRef}- autoCapitalize="none"- onChangeText={value => {- setInputValue(value);- }}- secureTextEntry={dialogInfo.secureTextEntry}- defaultValue={dialogInfo.defaultValue}- onSubmit={onPressPositive}- returnKeyLabel="Done"- returnKeyType="done"- placeholder={dialogInfo.inputPlaceholder}- />+ <View+ style={{+ paddingHorizontal: 12+ }}>+ <Input+ fwdRef={inputRef}+ autoCapitalize="none"+ onChangeText={value => {+ setInputValue(value);+ }}+ secureTextEntry={dialogInfo.secureTextEntry}+ defaultValue={dialogInfo.defaultValue}+ onSubmit={onPressPositive}+ returnKeyLabel="Done"+ returnKeyType="done"+ placeholder={dialogInfo.inputPlaceholder}+ />+ </View>)}<DialogButtons@@ -129,7 +136,7 @@ export const Dialog = ({context = 'global'}) => {positiveType={dialogInfo.positiveType}/></View>- <Toast context="local"/>+ <Toast context="local" /></BaseDialog>));