mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React, {useState} from 'react';
|
import React from 'react';
|
||||||
import {
|
import {
|
||||||
KeyboardAvoidingView,
|
KeyboardAvoidingView,
|
||||||
Modal,
|
Modal,
|
||||||
@@ -11,7 +11,7 @@ import {FlatList, TextInput} from 'react-native-gesture-handler';
|
|||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {getElevation, ToastEvent, db, DDS} from '../../utils/utils';
|
import {db, DDS, getElevation, ToastEvent} from '../../utils/utils';
|
||||||
import {updateEvent} from '../DialogManager/recievers';
|
import {updateEvent} from '../DialogManager/recievers';
|
||||||
import {Toast} from '../Toast';
|
import {Toast} from '../Toast';
|
||||||
|
|
||||||
|
|||||||
@@ -5,23 +5,14 @@ import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
|||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {eSendEvent} from '../../services/eventManager';
|
import {eSendEvent} from '../../services/eventManager';
|
||||||
import {
|
import {
|
||||||
eCloseFullscreenEditor,
|
|
||||||
eOnLoadNote,
|
|
||||||
eOnNewTopicAdded,
|
|
||||||
eClearEditor,
|
eClearEditor,
|
||||||
|
eCloseFullscreenEditor,
|
||||||
|
eOnNewTopicAdded,
|
||||||
} from '../../services/events';
|
} from '../../services/events';
|
||||||
import NavigationService from '../../services/NavigationService';
|
import NavigationService from '../../services/NavigationService';
|
||||||
import {exitEditorAnimation} from '../../utils/animations';
|
import {db, DDS, getElevation, history, ToastEvent} from '../../utils/utils';
|
||||||
import {
|
|
||||||
editing,
|
|
||||||
getElevation,
|
|
||||||
history,
|
|
||||||
ToastEvent,
|
|
||||||
db,
|
|
||||||
DDS,
|
|
||||||
} from '../../utils/utils';
|
|
||||||
import {updateEvent} from '../DialogManager/recievers';
|
|
||||||
import {dialogActions} from '../DialogManager/dialogActions';
|
import {dialogActions} from '../DialogManager/dialogActions';
|
||||||
|
import {updateEvent} from '../DialogManager/recievers';
|
||||||
|
|
||||||
export class Dialog extends Component {
|
export class Dialog extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Text, View, Platform} from 'react-native';
|
import {Platform, Text, View} from 'react-native';
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import {SIZE, WEIGHT, normalize} from '../../common/common';
|
import {normalize, SIZE, WEIGHT} from '../../common/common';
|
||||||
import {
|
import {deleteItems, opacity, rotate} from '../../utils/animations';
|
||||||
deleteItems,
|
import {getElevation, hexToRGBA, w} from '../../utils/utils';
|
||||||
opacity,
|
|
||||||
rotate,
|
|
||||||
slideLeft,
|
|
||||||
slideRight,
|
|
||||||
} from '../../utils/animations';
|
|
||||||
import {w, hexToRGBA, getElevation} from '../../utils/utils';
|
|
||||||
|
|
||||||
export const NotebookPlaceHolder = ({colors, animation}) => {
|
export const NotebookPlaceHolder = ({colors, animation}) => {
|
||||||
const slideRight = {
|
const slideRight = {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {ph, pv, SIZE, WEIGHT} from '../../common/common';
|
|||||||
import {eSendEvent, openVault} from '../../services/eventManager';
|
import {eSendEvent, openVault} from '../../services/eventManager';
|
||||||
import {eOnLoadNote} from '../../services/events';
|
import {eOnLoadNote} from '../../services/events';
|
||||||
import {openEditorAnimation} from '../../utils/animations';
|
import {openEditorAnimation} from '../../utils/animations';
|
||||||
import {getElevation, timeSince, DDS} from '../../utils/utils';
|
import {DDS, timeSince} from '../../utils/utils';
|
||||||
import {ActionSheetEvent, simpleDialogEvent} from '../DialogManager/recievers';
|
import {ActionSheetEvent, simpleDialogEvent} from '../DialogManager/recievers';
|
||||||
import {TEMPLATE_TRASH} from '../DialogManager/templates';
|
import {TEMPLATE_TRASH} from '../DialogManager/templates';
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ import {Text, TouchableOpacity, View} from 'react-native';
|
|||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import NavigationService from '../../services/NavigationService';
|
|
||||||
import {ToastEvent, w, getElevation, db, DDS} from '../../utils/utils';
|
|
||||||
|
|
||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {moveNoteHideEvent, ActionSheetEvent} from '../DialogManager/recievers';
|
import NavigationService from '../../services/NavigationService';
|
||||||
|
import {db, ToastEvent} from '../../utils/utils';
|
||||||
|
import {ActionSheetEvent, moveNoteHideEvent} from '../DialogManager/recievers';
|
||||||
|
|
||||||
export const NotebookItem = ({
|
export const NotebookItem = ({
|
||||||
item,
|
item,
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import React, {createRef, useEffect, useState} from 'react';
|
import React, {useEffect, useState} from 'react';
|
||||||
import {TextInput} from 'react-native';
|
import {TextInput} from 'react-native';
|
||||||
import Animated, {Easing} from 'react-native-reanimated';
|
import Animated, {Easing} from 'react-native-reanimated';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
|
|
||||||
import {br, SIZE, WEIGHT} from '../../common/common';
|
import {br, SIZE, WEIGHT} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {DDS} from '../../utils/utils';
|
|
||||||
import {inputRef} from '../../utils/refs';
|
import {inputRef} from '../../utils/refs';
|
||||||
|
import {DDS} from '../../utils/utils';
|
||||||
|
|
||||||
const {Value, timing, block} = Animated;
|
const {Value, timing, block} = Animated;
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
import React, {useEffect, useState} from 'react';
|
import React, {useEffect, useState} from 'react';
|
||||||
import {
|
import {Platform, StatusBar, Text, TouchableOpacity, View} from 'react-native';
|
||||||
Platform,
|
|
||||||
SafeAreaView,
|
|
||||||
StatusBar,
|
|
||||||
Text,
|
|
||||||
TouchableOpacity,
|
|
||||||
View,
|
|
||||||
} from 'react-native';
|
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import {SIZE, WEIGHT} from '../../common/common';
|
import {SIZE, WEIGHT} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {w, ToastEvent, db, selection} from '../../utils/utils';
|
|
||||||
import {eSendEvent} from '../../services/eventManager';
|
import {eSendEvent} from '../../services/eventManager';
|
||||||
import {eOpenMoveNoteDialog, eOpenSimpleDialog} from '../../services/events';
|
import {eOpenMoveNoteDialog, eOpenSimpleDialog} from '../../services/events';
|
||||||
|
import {db, selection, ToastEvent} from '../../utils/utils';
|
||||||
import {TEMPLATE_DELETE} from '../DialogManager/templates';
|
import {TEMPLATE_DELETE} from '../DialogManager/templates';
|
||||||
|
|
||||||
export const SelectionHeader = () => {
|
export const SelectionHeader = () => {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|||||||
import {SIZE} from '../../common/common';
|
import {SIZE} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import Animated from 'react-native-reanimated';
|
|
||||||
import {getElevation} from '../../utils/utils';
|
import {getElevation} from '../../utils/utils';
|
||||||
|
|
||||||
const SelectionWrapper = ({
|
const SelectionWrapper = ({
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React, {useState} from 'react';
|
import React from 'react';
|
||||||
import {FlatList, Platform, RefreshControl, Text, View} from 'react-native';
|
import {FlatList, Platform, RefreshControl, Text, View} from 'react-native';
|
||||||
import {SIZE, WEIGHT} from '../../common/common';
|
import {SIZE, WEIGHT} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {eSendEvent} from '../../services/eventManager';
|
import {eSendEvent} from '../../services/eventManager';
|
||||||
import {eScrollEvent, eClearSearch} from '../../services/events';
|
import {eClearSearch, eScrollEvent} from '../../services/events';
|
||||||
|
import {hexToRGBA} from '../../utils/utils';
|
||||||
import {NotebookItem} from '../NotebookItem';
|
import {NotebookItem} from '../NotebookItem';
|
||||||
import {hexToRGBA, getElevation} from '../../utils/utils';
|
|
||||||
import SelectionWrapper from '../SelectionWrapper';
|
import SelectionWrapper from '../SelectionWrapper';
|
||||||
|
|
||||||
const SimpleList = ({
|
const SimpleList = ({
|
||||||
|
|||||||
@@ -1,26 +1,25 @@
|
|||||||
import React, {Component, createRef} from 'react';
|
import React, {Component, createRef} from 'react';
|
||||||
import {View, Text, TouchableOpacity, Modal, ToastAndroid} from 'react-native';
|
import {Modal, Text, TouchableOpacity, View} from 'react-native';
|
||||||
import {SIZE, ph, pv, opacity, WEIGHT} from '../../common/common';
|
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
||||||
import {TextInput} from 'react-native-gesture-handler';
|
import {TextInput} from 'react-native-gesture-handler';
|
||||||
|
|
||||||
import {getElevation, ToastEvent, db, DDS} from '../../utils/utils';
|
|
||||||
import Share from 'react-native-share';
|
import Share from 'react-native-share';
|
||||||
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
|
import {opacity, ph, pv, SIZE, WEIGHT} from '../../common/common';
|
||||||
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {
|
import {
|
||||||
eSendEvent,
|
eSendEvent,
|
||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
eUnSubscribeEvent,
|
eUnSubscribeEvent,
|
||||||
} from '../../services/eventManager';
|
} from '../../services/eventManager';
|
||||||
import {
|
import {
|
||||||
|
eCloseVaultDialog,
|
||||||
eOnLoadNote,
|
eOnLoadNote,
|
||||||
eOpenVaultDialog,
|
eOpenVaultDialog,
|
||||||
eCloseVaultDialog,
|
|
||||||
refreshNotesPage,
|
refreshNotesPage,
|
||||||
} from '../../services/events';
|
} from '../../services/events';
|
||||||
import {openEditorAnimation} from '../../utils/animations';
|
import {openEditorAnimation} from '../../utils/animations';
|
||||||
import {ACTIONS} from '../../provider/actions';
|
import {db, DDS, getElevation, ToastEvent} from '../../utils/utils';
|
||||||
import {Toast} from '../Toast';
|
|
||||||
import {updateEvent} from '../DialogManager/recievers';
|
import {updateEvent} from '../DialogManager/recievers';
|
||||||
|
import {Toast} from '../Toast';
|
||||||
|
|
||||||
const passInputRef = createRef();
|
const passInputRef = createRef();
|
||||||
const confirmPassRef = createRef();
|
const confirmPassRef = createRef();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import React, {createRef} from 'react';
|
import React, {createRef} from 'react';
|
||||||
import {Platform, StatusBar, Text, TouchableOpacity, View} from 'react-native';
|
import {Platform, StatusBar, Text, TouchableOpacity, View} from 'react-native';
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
|
|
||||||
import {SIZE, WEIGHT} from '../../common/common';
|
import {SIZE, WEIGHT} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {eSendEvent} from '../../services/eventManager';
|
import {eSendEvent} from '../../services/eventManager';
|
||||||
@@ -13,6 +12,7 @@ import Menu, {MenuItem, MenuDivider} from 'react-native-material-menu';
|
|||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {sideMenuRef} from '../../utils/refs';
|
import {sideMenuRef} from '../../utils/refs';
|
||||||
import {moveNoteHideEvent} from '../DialogManager/recievers';
|
import {moveNoteHideEvent} from '../DialogManager/recievers';
|
||||||
|
|
||||||
export const Header = ({
|
export const Header = ({
|
||||||
heading,
|
heading,
|
||||||
canGoBack = true,
|
canGoBack = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user