Skip to content

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

refactor

ammarahm-ed5679f1af4140
diff --git a/apps/mobile/App.js b/apps/mobile/App.js
index 4263ed49e..9eb06b338 100644
--- a/apps/mobile/App.js
+++ b/apps/mobile/App.js
@@ -2,7 +2,6 @@ import React, { useEffect } from 'react';
import Orientation from 'react-native-orientation';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import Launcher from './src/components/launcher';
-import { RootView } from './src/navigation/RootView';
import { useTracked } from './src/provider';
import { initialize, useSettingStore, useUserStore } from './src/provider/stores';
import { DDS } from './src/services/DeviceDetection';
@@ -14,6 +13,7 @@ import { db } from './src/utils/database';
import { eDispatchAction } from './src/utils/events';
import { useAppEvents } from './src/utils/hooks/use-app-events';
import { MMKV } from './src/utils/database/mmkv';
+import { ApplicationHolder } from './src/navigation';
let databaseHasLoaded = false;
@@ -98,7 +98,7 @@ const App = () => {
return (
<SafeAreaProvider>
- <RootView />
+ <ApplicationHolder />
<Launcher onLoad={loadMainApp} />
</SafeAreaProvider>
);
diff --git a/apps/mobile/src/components/Menu/ColorSection.js b/apps/mobile/src/components/Menu/ColorSection.js
deleted file mode 100644
index c872fd45d..000000000
--- a/apps/mobile/src/components/Menu/ColorSection.js
+++ /dev/null
@@ -1,158 +0,0 @@
-import React, { useEffect, useState } from 'react';
-import { View } from 'react-native';
-import { useTracked } from '../../provider';
-import { useMenuStore, useNoteStore } from '../../provider/stores';
-import { eSendEvent, eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { COLORS_NOTE } from '../../utils/color-scheme';
-import { db } from '../../utils/database';
-import { refreshNotesPage } from '../../utils/events';
-import { normalize, SIZE } from '../../utils/size';
-import { presentDialog } from '../dialog/functions';
-import { PressableButton } from '../ui/pressable';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
-
-export const ColorSection = () => {
- const colorNotes = useMenuStore(state => state.colorNotes);
- const loading = useNoteStore(state => state.loading);
- const setColorNotes = useMenuStore(state => state.setColorNotes);
-
- useEffect(() => {
- if (!loading) {
- setColorNotes();
- }
- }, [loading]);
-
- return colorNotes.map((item, index) => {
- let alias = db.colors.alias(item.id);
- return <ColorItem key={item.id} alias={alias} item={item} index={index} />;
- });
-};
-
-const ColorItem = React.memo(
- ({ item, index, alias }) => {
- const [state] = useTracked();
- const { colors } = state;
- const setColorNotes = useMenuStore(state => state.setColorNotes);
- const [headerTextState, setHeaderTextState] = useState(null);
- alias = db.colors.alias(item.id);
-
- const onHeaderStateChange = event => {
- setTimeout(() => {
- if (event.id === item.id) {
- setHeaderTextState(event);
- } else {
- if (headerTextState !== null) {
- setHeaderTextState(null);
- }
- }
- }, 300);
- };
-
- useEffect(() => {
- eSubscribeEvent('onHeaderStateChange', onHeaderStateChange);
- return () => {
- eUnSubscribeEvent('onHeaderStateChange', onHeaderStateChange);
- };
- }, [headerTextState]);
-
- const onPress = item => {
- let params = {
- ...item,
- type: 'color',
- menu: true,
- get: 'colored'
- };
-
- eSendEvent(refreshNotesPage, params);
- Navigation.navigate('NotesPage', params, {
- heading: alias.slice(0, 1).toUpperCase() + alias.slice(1),
- id: item.id,
- type: 'color'
- });
- Navigation.closeDrawer();
- };
-
- const onLongPress = () => {
- presentDialog({
- title: 'Rename color',
- input: true,
- inputPlaceholder: 'Enter name for this color',
- defaultValue: alias,
- paragraph: 'You are renaming the color ' + item.title,
- positivePress: async value => {
- if (!value || value.trim().length === 0) return;
- await db.colors.rename(item.id, value);
- setColorNotes();
- console.log('color updated');
- },
- positiveText: 'Rename'
- });
- };
-
- return (
- <PressableButton
- customColor={headerTextState?.id === item.id ? 'rgba(0,0,0,0.04)' : 'transparent'}
- onLongPress={onLongPress}
- customSelectedColor={COLORS_NOTE[item.title.toLowerCase()]}
- customAlpha={!colors.night ? -0.02 : 0.02}
- customOpacity={0.12}
- onPress={() => onPress(item)}
- customStyle={{
- width: '100%',
- alignSelf: 'center',
- borderRadius: 5,
- flexDirection: 'row',
- paddingHorizontal: 8,
- justifyContent: 'space-between',
- alignItems: 'center',
- height: normalize(50),
- marginBottom: 5
- }}
- >
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center'
- }}
- >
- <View
- style={{
- width: 30,
- justifyContent: 'center',
- alignItems: 'flex-start'
- }}
- >
- <View
- style={{
- width: SIZE.lg - 2,
- height: SIZE.lg - 2,
- backgroundColor: COLORS_NOTE[item.title.toLowerCase()],
- borderRadius: 100,
- justifyContent: 'center',
- marginRight: 10
- }}
- />
- </View>
- {headerTextState?.id === item.id ? (
- <Heading color={colors.heading} size={SIZE.md}>
- {alias.slice(0, 1).toUpperCase() + alias.slice(1)}
- </Heading>
- ) : (
- <Paragraph color={colors.pri} size={SIZE.md}>
- {alias.slice(0, 1).toUpperCase() + alias.slice(1)}
- </Paragraph>
- )}
- </View>
- </PressableButton>
- );
- },
- (prev, next) => {
- if (prev.item?.dateModified !== next.item?.dateModified) return false;
- if (prev.alias !== next.alias) return false;
- if (prev.item?.id !== next.item?.id) return false;
-
- return true;
- }
-);
diff --git a/apps/mobile/src/components/NoteItem/index.js b/apps/mobile/src/components/NoteItem/index.js
deleted file mode 100644
index 2ebfbbac0..000000000
--- a/apps/mobile/src/components/NoteItem/index.js
+++ /dev/null
@@ -1,303 +0,0 @@
-import { decode, EntityLevel } from 'entities';
-import React from 'react';
-import { View } from 'react-native';
-import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import { notesnook } from '../../../e2e/test.ids';
-import { useTracked } from '../../provider';
-import { useSettingStore } from '../../provider/stores';
-import { eSendEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { COLORS_NOTE } from '../../utils/color-scheme';
-import { db } from '../../utils/database';
-import { refreshNotesPage } from '../../utils/events';
-import { SIZE } from '../../utils/size';
-import { IconButton } from '../ui/icon-button';
-import { Button } from '../ui/button';
-import { TimeSince } from '../side-menu/TimeSince';
-import { Properties } from '../properties';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
-
-const navigateToTopic = topic => {
- let routeName = 'NotesPage';
- let params = { ...topic, menu: false, get: 'topics' };
- let headerState = {
- heading: topic.title,
- id: topic.id,
- type: topic.type
- };
- eSendEvent(refreshNotesPage, params);
- Navigation.navigate(routeName, params, headerState);
-};
-
-function navigateToTag(item) {
- let _tag = db.tags.tag(item.id);
- if (!_tag) return;
- let params = {
- ..._tag,
- type: 'tag',
- get: 'tagged'
- };
-
- eSendEvent(refreshNotesPage, params);
- Navigation.navigate('NotesPage', params, {
- heading: '#' + _tag.title,
- id: _tag.id,
- type: _tag.type
- });
-}
-
-const showActionSheet = item => {
- Properties.present(item);
-};
-
-const NoteItem = ({ item, isTrash, tags, dateBy = 'dateCreated', noOpen = false }) => {
- const [state] = useTracked();
- const { colors } = state;
- const settings = useSettingStore(state => state.settings);
- const compactMode = settings.notesListMode === 'compact';
- const attachmentCount = db.attachments?.ofNote(item.id, 'all')?.length || 0;
-
- function getNotebook() {
- if (isTrash || !item.notebooks || item.notebooks.length < 1) return [];
- let item_notebook = item.notebooks?.slice(0, 1)[0];
- let notebook = db.notebooks.notebook(item_notebook.id);
-
- if (!notebook) return [];
- let topic = notebook.topics.topic(item_notebook.topics[0])?._topic;
-
- if (!topic) return [];
-
- notebook = notebook.data;
-
- return [
- {
- title: `${notebook?.title} › ${topic?.title}`,
- notebook: notebook,
- topic: topic
- }
- ];
- }
-
- return (
- <>
- <View
- style={{
- flexGrow: 1,
- flexShrink: 1
- }}
- >
- {!compactMode ? (
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- zIndex: 10,
- elevation: 10,
- marginBottom: 2.5
- }}
- >
- {getNotebook().map(_item => (
- <Button
- title={_item.title}
- key={_item}
- height={20}
- icon="book-outline"
- type="grayBg"
- fontSize={SIZE.xs}
- iconSize={SIZE.sm}
- textStyle={{
- marginRight: 0
- }}
- style={{
- borderRadius: 5,
- marginRight: 5,
- borderWidth: 0.5,
- borderColor: colors.icon,
- paddingHorizontal: 6
- }}
- onPress={() => navigateToTopic(_item.topic)}
- />
- ))}
- </View>
- ) : null}
-
- <Heading
- numberOfLines={1}
- color={COLORS_NOTE[item.color?.toLowerCase()] || colors.heading}
- style={{
- flexWrap: 'wrap'
- }}
- size={SIZE.md}
- >
- {item.title}
- </Heading>
-
- {item.headline && !compactMode ? (
- <Paragraph
- style={{
- flexWrap: 'wrap'
- }}
- numberOfLines={2}
- >
- {decode(item.headline, {
- level: EntityLevel.HTML
- })}
- </Paragraph>
- ) : null}
-
- <View
- style={{
- flexDirection: 'row',
- justifyContent: 'flex-start',
- alignItems: 'center',
- width: '100%',
- marginTop: 5,
- height: SIZE.md + 2
- }}
- >
- {!isTrash ? (
- <>
- {item.conflicted ? (
- <Icon
- name="alert-circle"
- style={{
- marginRight: 6
- }}
- size={SIZE.sm}
- color={colors.red}
- />
- ) : null}
- <TimeSince
- style={{
- fontSize: SIZE.xs,
- color: colors.icon,
- marginRight: 6
- }}
- time={item[dateBy]}
- updateFrequency={Date.now() - item[dateBy] < 60000 ? 2000 : 60000}
- />
-
- {attachmentCount > 0 ? (
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- marginRight: 6
- }}
- >
- <Icon name="attachment" size={SIZE.md} color={colors.icon} />
- <Paragraph color={colors.icon} size={SIZE.xs}>
- {attachmentCount}
- </Paragraph>
- </View>
- ) : null}
-
- {item.pinned ? (
- <Icon
- testID="icon-pinned"
- name="pin-outline"
- size={SIZE.sm}
- style={{
- marginRight: 6
- }}
- color={COLORS_NOTE[item.color?.toLowerCase()] || colors.accent}
- />
- ) : null}
-
- {item.locked ? (
- <Icon
- name="lock"
- size={SIZE.sm}
- style={{
- marginRight: 6
- }}
- color={colors.icon}
- />
- ) : null}
-
- {item.favorite ? (
- <Icon
- testID="icon-star"
- name="star"
- size={SIZE.md}
- style={{
- marginRight: 6
- }}
- color="orange"
- />
- ) : null}
-
- {!isTrash && !compactMode && tags
- ? tags.map(item =>
- item.id ? (
- <Button
- title={'#' + item.alias}
- key={item.id}
- height={23}
- type="gray"
- textStyle={{
- textDecorationLine: 'underline'
- }}
- hitSlop={{ top: 8, bottom: 12, left: 0, right: 0 }}
- fontSize={SIZE.xs}
- style={{
- borderRadius: 5,
- paddingHorizontal: 6,
- marginRight: 4,
- zIndex: 10,
- maxWidth: tags.length > 1 ? 130 : null
- }}
- onPress={() => navigateToTag(item)}
- />
- ) : null
- )
- : null}
- </>
- ) : (
- <>
- <Paragraph
- color={colors.icon}
- size={SIZE.xs}
- style={{
- marginRight: 6
- }}
- >
- Deleted on{' '}
- {item && item.dateDeleted
- ? new Date(item.dateDeleted).toISOString().slice(0, 10)
- : null}
- </Paragraph>
-
- <Paragraph
- color={colors.accent}
- size={SIZE.xs}
- style={{
- marginRight: 6
- }}
- >
- {item.itemType[0].toUpperCase() + item.itemType.slice(1)}
- </Paragraph>
- </>
- )}
- </View>
- </View>
- <IconButton
- testID={notesnook.listitem.menu}
- color={colors.pri}
- name="dots-horizontal"
- size={SIZE.xl}
- onPress={() => !noOpen && showActionSheet(item, isTrash)}
- customStyle={{
- justifyContent: 'center',
- height: 35,
- width: 35,
- borderRadius: 100,
- alignItems: 'center'
- }}
- />
- </>
- );
-};
-
-export default NoteItem;
diff --git a/apps/mobile/src/components/Properties/useActions.js b/apps/mobile/src/components/Properties/useActions.js
deleted file mode 100644
index 37fb47f44..000000000
--- a/apps/mobile/src/components/Properties/useActions.js
+++ /dev/null
@@ -1,680 +0,0 @@
-import Clipboard from '@react-native-clipboard/clipboard';
-import React, { useEffect, useState } from 'react';
-import { Platform } from 'react-native';
-import Share from 'react-native-share';
-import { notesnook } from '../../../e2e/test.ids';
-import { useTracked } from '../../provider';
-import { Actions } from '../../provider/Actions';
-import {
- useEditorStore,
- useMenuStore,
- useSelectionStore,
- useTagStore,
- useUserStore
-} from '../../provider/stores';
-import {
- eSendEvent,
- eSubscribeEvent,
- eUnSubscribeEvent,
- openVault,
- presentSheet,
- ToastEvent
-} from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import Notifications from '../../services/Notifications';
-import SettingsService from '../../services/SettingsService';
-import { editing, toTXT } from '../../utils';
-import {
- ACCENT,
- COLOR_SCHEME,
- COLOR_SCHEME_DARK,
- COLOR_SCHEME_LIGHT,
- COLOR_SCHEME_PITCH_BLACK,
- setColorScheme
-} from '../../utils/color-scheme';
-import { db } from '../../utils/database';
-import {
- eOpenAddNotebookDialog,
- eOpenAddTopicDialog,
- eOpenAttachmentsDialog,
- eOpenExportDialog,
- eOpenLoginDialog,
- eOpenMoveNoteDialog,
- eOpenPublishNoteDialog
-} from '../../utils/events';
-import { deleteItems } from '../../utils/functions';
-import { MMKV } from '../../utils/database/mmkv';
-import { sleep } from '../../utils/time';
-import { presentDialog } from '../dialog/functions';
-import { MoveNotes } from '../MoveNoteDialog/movenote';
-import NoteHistory from '../NoteHistory';
-import tiny from '../../views/Editor/tiny/tiny.js';
-import { EditorWebView } from '../../views/Editor/Functions';
-
-export const useActions = ({ close = () => {}, item }) => {
- const [state, dispatch] = useTracked();
- const { colors } = state;
- const clearSelection = useSelectionStore(state => state.clearSelection);
- const setSelectedItem = useSelectionStore(state => state.setSelectedItem);
- const setMenuPins = useMenuStore(state => state.setMenuPins);
- const [isPinnedToMenu, setIsPinnedToMenu] = useState(db.settings.isPinned(item.id));
- console.log(item.readonly, 'readonly');
- const user = useUserStore(state => state.user);
- const [notifPinned, setNotifPinned] = useState(null);
- const alias =
- item.type === 'tag'
- ? db.tags.alias(item.id)
- : item.type === 'color'
- ? db.colors.alias(item.id)
- : item.title;
-
- const isPublished = item.type === 'note' && db.monographs.isPublished(item.id);
- const noteInTopic =
- item.type === 'note' &&
- editing.actionAfterFirstSave.type === 'topic' &&
- db.notebooks
- .notebook(editing.actionAfterFirstSave.notebook)
- .topics.topic(editing.actionAfterFirstSave.id)
- .has(item.id);
-
- useEffect(() => {
- if (item.id === null) return;
- checkNotifPinned();
- if (item.type !== 'note') {
- setIsPinnedToMenu(db.settings.isPinned(item.id));
- }
- }, [item]);
-
- function checkNotifPinned() {
- let pinned = Notifications.getPinnedNotes();
- if (!pinned) {
- setNotifPinned(null);
- return;
- }
-
- let index = pinned.findIndex(notif => notif.tag === item.id);
- if (index !== -1) {
- setNotifPinned(pinned[index]);
- } else {
- setNotifPinned(null);
- }
- }
-
- const onUpdate = async type => {
- if (type === 'unpin') {
- await sleep(1000);
- await Notifications.get();
- checkNotifPinned();
- }
- };
-
- useEffect(() => {
- eSubscribeEvent('onUpdate', onUpdate);
-
- return () => {
- eUnSubscribeEvent('onUpdate', onUpdate);
- };
- }, [item]);
-
- function changeColorScheme(colors = COLOR_SCHEME, accent = ACCENT) {
- let newColors = setColorScheme(colors, accent);
- dispatch({ type: Actions.THEME, colors: newColors });
- }
-
- function switchTheme() {
- if (!colors.night) {
- MMKV.setStringAsync('theme', JSON.stringify({ night: true }));
- let nextTheme = SettingsService.get().pitchBlack
- ? COLOR_SCHEME_PITCH_BLACK
- : COLOR_SCHEME_DARK;
- changeColorScheme(nextTheme);
- return;
- }
- MMKV.setStringAsync('theme', JSON.stringify({ night: false }));
- changeColorScheme(COLOR_SCHEME_LIGHT);
- }
-
- function addTo() {
- close();
- clearSelection(true);
- setSelectedItem(item);
- setTimeout(() => {
- eSendEvent(eOpenMoveNoteDialog, item);
- }, 300);
- }
-
- async function addToFavorites() {
- if (!item.id) return;
- close();
- await db.notes.note(item.id).favorite();
- Navigation.setRoutesToUpdate([
- Navigation.routeNames.NotesPage,
- Navigation.routeNames.Favorites,
- Navigation.routeNames.Notes
- ]);
- }
-
- async function pinItem() {
- if (!item.id) return;
- close();
- let type = item.type;
- if (db[`${type}s`].pinned.length === 3 && !item.pinned) {
- ToastEvent.show({
- heading: `Cannot pin more than 3 ${type}s`,
- type: 'error'
- });
- return;
- }
- await db[`${type}s`][type](item.id).pin();
- Navigation.setRoutesToUpdate([Navigation.routeNames.Notebooks, Navigation.routeNames.Notes]);
- }
-
- async function pinToNotifications() {
- if (Platform.OS === 'ios') return;
- if (notifPinned !== null) {
- Notifications.remove(item.id, notifPinned.identifier);
- await sleep(1000);
- await Notifications.get();
- checkNotifPinned();
- return;
- }
- if (item.locked) return;
- Notifications.present({
- title: item.title,
- message: item.headline,
- subtitle: item.headline,
- bigText: await toTXT(item, true),
- ongoing: true,
- actions: ['UNPIN'],
- tag: item.id
- });
- await sleep(1000);
- await Notifications.get();
- checkNotifPinned();
- }
-
- async function restoreTrashItem() {
- close();
- await db.trash.restore(item.id);
- Navigation.setRoutesToUpdate([
- Navigation.routeNames.Tags,
- Navigation.routeNames.Notes,
- Navigation.routeNames.Notebooks,
- Navigation.routeNames.NotesPage,
- Navigation.routeNames.Favorites,
- Navigation.routeNames.Trash
- ]);
- let type = item.type === 'trash' ? item.itemType : item.type;
- ToastEvent.show({
- heading: type === 'note' ? 'Note restored from trash' : 'Notebook restored from trash',
- type: 'success'
- });
- }
-
- async function copyContent() {
- if (item.locked) {
- close();
- await sleep(300);
- openVault({
- copyNote: true,
- novault: true,
- locked: true,
- item: item,
- title: 'Copy note',
- description: 'Unlock note to copy to clipboard.'
- });
- } else {
- Clipboard.setString(await toTXT(item));
- ToastEvent.show({
- heading: 'Note copied to clipboard',
- type: 'success',
- context: 'local'
- });
- }
- }
-
- async function publishNote() {
- if (!user) {
- ToastEvent.show({
- heading: 'Login required',
- message: 'Login to publish note',
- context: 'local',
- func: () => {
- eSendEvent(eOpenLoginDialog);
- },
- actionText: 'Login'
- });
- return;
- }
-
- if (!user.isEmailConfirmed) {
- ToastEvent.show({
- heading: 'Email is not verified',
- message: 'Please verify your email first.',
- context: 'local'
- });
- return;
- }
- if (item.locked) {
- ToastEvent.show({
- heading: 'Locked notes cannot be published',
- type: 'error',
- context: 'local'
- });
- return;
- }
- close();
- await sleep(300);
- eSendEvent(eOpenPublishNoteDialog, item);
- }
-
- async function addToVault() {
- if (!item.id) return;
- if (item.locked) {
- close();
- await sleep(300);
- openVault({
- item: item,
- novault: true,
- locked: true,
- permanant: true,
- title: 'Unlock note',
- description: 'Remove note from the vault.'
- });
- return;
- }
- try {
- await db.vault.add(item.id);
- let note = db.notes.note(item.id).data;
- if (note.locked) {
- close();
- Navigation.setRoutesToUpdate([
- Navigation.routeNames.NotesPage,
- Navigation.routeNames.Favorites,
- Navigation.routeNames.Notes
- ]);
- }
- } catch (e) {
- close();
- await sleep(300);
- switch (e.message) {
- case db.vault.ERRORS.noVault:
- openVault({
- item: item,
- novault: false,
- title: 'Create vault',
- description: 'Set a password to create a vault and lock note.'
- });
- break;
- case db.vault.ERRORS.vaultLocked:
- openVault({
- item: item,
- novault: true,
- locked: true,
- title: 'Lock note',
- description: 'Give access to vault to lock this note.'
- });
- break;
- }
- }
- }
-
- async function createMenuShortcut() {
- close();
- try {
- if (isPinnedToMenu) {
- await db.settings.unpin(item.id);
- return;
- } else {
- if (item.type === 'topic') {
- await db.settings.pin(item.type, {
- id: item.id,
- notebookId: item.notebookId
- });
- } else {
- await db.settings.pin(item.type, { id: item.id });
- }
- }
- setIsPinnedToMenu(db.settings.isPinned(item.id));
- setMenuPins();
- } catch (e) {}
- }
-
- async function renameTag() {
- close();
- await sleep(300);
- presentDialog({
- title: 'Rename tag',
- paragraph: 'Change the title of the tag ' + alias,
- positivePress: async value => {
- if (!value || value === '' || value.trimStart().length == 0) return;
- await db.tags.rename(item.id, db.tags.sanitize(value));
- useTagStore.getState().setTags();
- useMenuStore.getState().setMenuPins();
- Navigation.setRoutesToUpdate([
- Navigation.routeNames.Notes,
- Navigation.routeNames.NotesPage,
- Navigation.routeNames.Tags
- ]);
- },
- input: true,
- defaultValue: alias,
- inputPlaceholder: 'Enter title of tag',
- positiveText: 'Save'
- });
- }
-
- async function shareNote() {
- if (item.locked) {
- close();
- await sleep(300);
- openVault({
- item: item,
- novault: true,
- locked: true,
- share: true,
- title: 'Share note',
- description: 'Unlock note to share it.'
- });
- } else {
- Share.open({
- title: 'Share note to',
- failOnCancel: false,
- message: await toTXT(item)
- });
- }
- }
-
- async function deleteItem() {
- close();
- if (item.type === 'tag') {
- await sleep(300);
- presentDialog({
- title: 'Delete tag',
- paragraph: 'This tag will be removed from all notes.',
- positivePress: async value => {
- await db.tags.remove(item.id);
- useTagStore.getState().setTags();
- Navigation.setRoutesToUpdate([
- Navigation.routeNames.Notes,
- Navigation.routeNames.NotesPage,
- Navigation.routeNames.Tags
- ]);
- },
- positiveText: 'Delete',
- positiveType: 'errorShade'
- });
- return;
- }
- if (item.locked) {
- await sleep(300);
- openVault({
- deleteNote: true,
- novault: true,
- locked: true,
- item: item,
- title: 'Delete note',
- description: 'Unlock note to delete it.'
- });
- } else {
- try {
- close();
- await deleteItems(item);
- } catch (e) {}
- }
- }
- async function removeNoteFromTopic() {
- await db.notebooks
- .notebook(editing.actionAfterFirstSave.notebook)
- .topics.topic(editing.actionAfterFirstSave.id)
- .delete(item.id);
- Navigation.setRoutesToUpdate([
- Navigation.routeNames.Notebooks,
- Navigation.routeNames.Notes,
- Navigation.routeNames.NotesPage,
- Navigation.routeNames.Notebook
- ]);
- close();
- }
-
- async function deleteTrashItem() {
- close();
- await sleep(300);
- presentDialog({
- title: `Permanent delete`,
- paragraph: `Are you sure you want to delete this ${item.itemType} permanantly from trash?`,
- positiveText: 'Delete',
- negativeText: 'Cancel',
- positivePress: async () => {
- await db.trash.delete(item.id);
- Navigation.setRoutesToUpdate([Navigation.routeNames.Trash]);
- useSelectionStore.getState().setSelectionMode(false);
- ToastEvent.show({
- heading: 'Permanantly deleted items',
- type: 'success',
- context: 'local'
- });
- },
- positiveType: 'errorShade'
- });
- }
-
- async function openHistory() {
- close();
- await sleep(300);
- presentSheet({
- component: ref => <NoteHistory ref={ref} note={item} />
- });
- }
-
- async function showAttachments() {
- close();
- await sleep(300);
- eSendEvent(eOpenAttachmentsDialog, item);
- }
-
- async function exportNote() {
- close();
- await sleep(300);
- eSendEvent(eOpenExportDialog, [item]);
- }
-
- const toggleReadyOnlyMode = async () => {
- await db.notes.note(item.id).readonly();
- let current = db.notes.note(item.id).data.readonly;
- if (useEditorStore.getState().currentEditingNote === item.id) {
- useEditorStore.getState().setReadonly(current);
- tiny.call(EditorWebView, tiny.toogleReadMode(current ? 'readonly' : 'design'));
- }
- Navigation.setRoutesToUpdate([
- Navigation.routeNames.NotesPage,
- Navigation.routeNames.Favorites,
- Navigation.routeNames.Notes
- ]);
- close();
- };
-
- const actions = [
- {
- name: 'Add to notebook',
- title: 'Add to notebook',
- icon: 'book-outline',
- func: addTo
- },
- {
- name: 'Move notes',
- title: 'Add notes',
- icon: 'plus',
- func: async () => {
- close();
- await sleep(300);
- MoveNotes.present(db.notebooks.notebook(item.notebookId).data, item);
- }
- },
-
- {
- name: 'Pin',
- title: item.pinned ? 'Unpin' : 'Pin to top',
- icon: item.pinned ? 'pin-off-outline' : 'pin-outline',
- func: pinItem,
- close: false,
- check: true,
- on: item.pinned,
- nopremium: true,
- id: notesnook.ids.dialogs.actionsheet.pin
- },
- {
- name: 'Favorite',
- title: !item.favorite ? 'Favorite' : 'Unfavorite',
- icon: item.favorite ? 'star-off' : 'star-outline',
- func: addToFavorites,
- close: false,
- check: true,
- on: item.favorite,
- nopremium: true,
- id: notesnook.ids.dialogs.actionsheet.favorite,
- color: 'orange'
- },
- {
- name: 'PinToNotif',
- title: notifPinned !== null ? 'Unpin from Notifications' : 'Pin to Notifications',
- icon: 'bell',
- on: notifPinned !== null,
- func: pinToNotifications
- },
-
- {
- name: 'Edit Notebook',
- title: 'Edit notebook',
- icon: 'square-edit-outline',
- func: async () => {
- close();
- await sleep(300);
- eSendEvent(eOpenAddNotebookDialog, item);
- }
- },
- {
- name: 'Edit Topic',
- title: 'Edit topic',
- icon: 'square-edit-outline',
- func: async () => {
- close();
- await sleep(300);
- eSendEvent(eOpenAddTopicDialog, {
- notebookId: item.notebookId,
- toEdit: item
- });
- }
- },
- {
- name: 'Copy',
- title: 'Copy',
- icon: 'content-copy',
- func: copyContent
- },
- {
- name: 'Restore',
- title: 'Restore ' + item.itemType,
- icon: 'delete-restore',
- func: restoreTrashItem
- },
-
- {
- name: 'Publish',
- title: isPublished ? 'Published' : 'Publish',
- icon: 'cloud-upload-outline',
- on: isPublished,
- func: publishNote
- },
- {
- name: 'Vault',
- title: item.locked ? 'Remove from vault' : 'Add to vault',
- icon: item.locked ? 'shield-off-outline' : 'shield-outline',
- func: addToVault,
- on: item.locked
- },
-
- {
- name: 'Add Shortcut',
- title: isPinnedToMenu ? 'Remove Shortcut' : 'Add Shortcut',
- icon: isPinnedToMenu ? 'link-variant-remove' : 'link-variant',
- func: createMenuShortcut,
- close: false,
- check: true,
- on: isPinnedToMenu,
- nopremium: true,
- id: notesnook.ids.dialogs.actionsheet.pinMenu
- },
- {
- name: 'Rename Tag',
- title: 'Rename tag',
- icon: 'square-edit-outline',
- func: renameTag
- },
- {
- name: 'Share',
- title: 'Share',
- icon: 'share-variant',
- func: shareNote
- },
- {
- name: 'Attachments',
- title: 'Attachments',
- icon: 'attachment',
- func: showAttachments
- },
- {
- name: 'Export',
- title: 'Export',
- icon: 'export',
- func: exportNote
- },
- {
- name: 'RemoveTopic',
- title: 'Remove from topic',
- hidden: !noteInTopic,
- icon: 'minus-circle-outline',
- func: removeNoteFromTopic
- },
- {
- name: 'Delete',
- title:
- item.type !== 'notebook' && item.type !== 'note' ? 'Delete ' + item.type : 'Move to trash',
- icon: 'delete-outline',
- type: 'error',
- func: deleteItem
- },
- {
- name: 'PermDelete',
- title: 'Delete ' + item.itemType,
- icon: 'delete',
- func: deleteTrashItem
- },
- {
- name: 'ReadOnly',
- title: 'Read only',
- icon: 'pencil-lock',
- func: toggleReadyOnlyMode,
- on: item.readonly
- },
- {
- name: 'History',
- title: 'History',
- icon: 'history',
- func: openHistory
- },
- {
- name: 'Dark Mode',
- title: 'Dark mode',
- icon: 'theme-light-dark',
- func: switchTheme,
- switch: true,
- on: colors.night ? true : false,
- close: false,
- nopremium: true,
- id: notesnook.ids.dialogs.actionsheet.night
- }
- ];
-
- return actions;
-};
diff --git a/apps/mobile/src/components/Announcements/announcement.js b/apps/mobile/src/components/announcements/announcement.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/announcement.js
rename to apps/mobile/src/components/announcements/announcement.js
diff --git a/apps/mobile/src/components/Announcements/body.js b/apps/mobile/src/components/announcements/body.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/body.js
rename to apps/mobile/src/components/announcements/body.js
diff --git a/apps/mobile/src/components/Announcements/cta.js b/apps/mobile/src/components/announcements/cta.js
similarity index 97%
rename from apps/mobile/src/components/Announcements/cta.js
rename to apps/mobile/src/components/announcements/cta.js
index 049155c65..99a72c1db 100644
--- a/apps/mobile/src/components/Announcements/cta.js
+++ b/apps/mobile/src/components/announcements/cta.js
@@ -6,7 +6,7 @@ import { eCloseAnnouncementDialog } from '../../utils/events';
import { openLinkInBrowser } from '../../utils/functions';
import { SIZE } from '../../utils/size';
import { sleep } from '../../utils/time';
-import SettingsBackupAndRestore from '../../views/Settings/backup-restore';
+import SettingsBackupAndRestore from '../../screens/settings/backup-restore';
import { Button } from '../ui/button';
import SheetProvider from '../sheet-provider';
import { PricingPlans } from '../premium/pricing-plans';
diff --git a/apps/mobile/src/components/Announcements/description.js b/apps/mobile/src/components/announcements/description.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/description.js
rename to apps/mobile/src/components/announcements/description.js
diff --git a/apps/mobile/src/components/Announcements/functions.js b/apps/mobile/src/components/announcements/functions.js
similarity index 96%
rename from apps/mobile/src/components/Announcements/functions.js
rename to apps/mobile/src/components/announcements/functions.js
index 10598f857..46787979f 100644
--- a/apps/mobile/src/components/Announcements/functions.js
+++ b/apps/mobile/src/components/announcements/functions.js
@@ -1,7 +1,7 @@
import React, { Fragment } from 'react';
import { View } from 'react-native';
import { allowedPlatforms } from '../../provider/stores';
-import { ProFeatures } from '../ResultDialog/pro-features';
+import { ProFeatures } from '../dialogs/result/pro-features';
import { Body } from './body';
import { Cta } from './cta';
import { Description } from './description';
diff --git a/apps/mobile/src/components/Announcements/index.js b/apps/mobile/src/components/announcements/index.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/index.js
rename to apps/mobile/src/components/announcements/index.js
diff --git a/apps/mobile/src/components/Announcements/list.js b/apps/mobile/src/components/announcements/list.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/list.js
rename to apps/mobile/src/components/announcements/list.js
diff --git a/apps/mobile/src/components/Announcements/photo.js b/apps/mobile/src/components/announcements/photo.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/photo.js
rename to apps/mobile/src/components/announcements/photo.js
diff --git a/apps/mobile/src/components/Announcements/subheading.js b/apps/mobile/src/components/announcements/subheading.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/subheading.js
rename to apps/mobile/src/components/announcements/subheading.js
diff --git a/apps/mobile/src/components/Announcements/title.js b/apps/mobile/src/components/announcements/title.js
similarity index 100%
rename from apps/mobile/src/components/Announcements/title.js
rename to apps/mobile/src/components/announcements/title.js
diff --git a/apps/mobile/src/components/AttachmentDialog/attachmentitem.js b/apps/mobile/src/components/attachments/attachmentitem.js
similarity index 100%
rename from apps/mobile/src/components/AttachmentDialog/attachmentitem.js
rename to apps/mobile/src/components/attachments/attachmentitem.js
diff --git a/apps/mobile/src/components/AttachmentDialog/index.js b/apps/mobile/src/components/attachments/index.js
similarity index 100%
rename from apps/mobile/src/components/AttachmentDialog/index.js
rename to apps/mobile/src/components/attachments/index.js
diff --git a/apps/mobile/src/components/dialogprovider/index.js b/apps/mobile/src/components/dialogprovider/index.js
index dbebad159..5d5857951 100644
--- a/apps/mobile/src/components/dialogprovider/index.js
+++ b/apps/mobile/src/components/dialogprovider/index.js
@@ -1,27 +1,27 @@
import React from 'react';
import { useTracked } from '../../provider';
-import { EditorSettings } from '../../views/Editor/EditorSettings';
-import { AddNotebookDialog } from '../AddNotebookDialog';
-import { AddTopicDialog } from '../AddTopicDialog';
-import { AnnouncementDialog } from '../Announcements';
-import { AttachmentDialog } from '../AttachmentDialog';
+import { EditorSettings } from '../../screens/editor/EditorSettings';
+import { AddNotebookSheet } from '../sheets/add-notebook';
+import { AddTopicDialog } from '../dialogs/add-topic';
+import { AnnouncementDialog } from '../announcements';
+import { AttachmentDialog } from '../attachments';
import Auth from '../auth';
import { SessionExpired } from '../auth/session-expired';
import { Dialog } from '../dialog';
-import ExportDialog from '../ExportDialog';
+import ExportNotesSheet from '../sheets/export-notes';
import ImagePreview from '../image-preview';
-import MergeEditor from '../MergeEditor';
-import MoveNoteDialog from '../MoveNoteDialog';
+import MergeConflicts from '../merge-conflicts';
+import AddToNotebookSheet from '../sheets/add-to';
import PremiumDialog from '../premium';
import { Expiring } from '../premium/expiring';
-import PublishNoteDialog from '../PublishNoteDialog';
-import RateDialog from '../RateDialog';
-import RecoveryKeyDialog from '../RecoveryKeyDialog';
-import RestoreDialog from '../RestoreDialog';
-import ResultDialog from '../ResultDialog';
+import PublishNoteSheet from '../sheets/publish-note';
+import RateAppSheet from '../sheets/rate-app';
+import RecoveryKeySheet from '../sheets/recovery-key';
+import RestoreDataSheet from '../sheets/restore-data';
+import ResultDialog from '../dialogs/result';
import SheetProvider from '../sheet-provider';
-import TagsDialog from '../TagsDialog';
-import { VaultDialog } from '../VaultDialog';
+import ManageTagsSheet from '../sheets/manage-tags';
+import { VaultDialog } from '../dialogs/vault';
function DialogProvider() {
const [state] = useTracked();
@@ -31,22 +31,22 @@ function DialogProvider() {
<>
<Dialog context="global" />
<AddTopicDialog colors={colors} />
- <AddNotebookDialog colors={colors} />
+ <AddNotebookSheet colors={colors} />
<PremiumDialog colors={colors} />
<Auth colors={colors} />
- <MergeEditor />
- <ExportDialog />
- <RecoveryKeyDialog colors={colors} />
+ <MergeConflicts />
+ <ExportNotesSheet />
+ <RecoveryKeySheet colors={colors} />
<SheetProvider />
- <RestoreDialog />
+ <RestoreDataSheet />
<ResultDialog />
<VaultDialog colors={colors} />
- <MoveNoteDialog colors={colors} />
- <RateDialog />
+ <AddToNotebookSheet colors={colors} />
+ <RateAppSheet />
<ImagePreview />
<EditorSettings />
- <PublishNoteDialog />
- <TagsDialog />
+ <PublishNoteSheet />
+ <ManageTagsSheet />
<AttachmentDialog />
<Expiring />
<AnnouncementDialog />
diff --git a/apps/mobile/src/components/AddTopicDialog/index.js b/apps/mobile/src/components/dialogs/addtopic/index.js
similarity index 87%
rename from apps/mobile/src/components/AddTopicDialog/index.js
rename to apps/mobile/src/components/dialogs/addtopic/index.js
index 6e7662903..633d9e54a 100644
--- a/apps/mobile/src/components/AddTopicDialog/index.js
+++ b/apps/mobile/src/components/dialogs/addtopic/index.js
@@ -1,19 +1,19 @@
import React, { createRef } from 'react';
import { Keyboard, LayoutAnimation, UIManager, View } from 'react-native';
import { Transition, Transitioning, TransitioningView } from 'react-native-reanimated';
-import { useMenuStore } from '../../provider/stores';
-import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { db } from '../../utils/database';
-import { eCloseAddTopicDialog, eOpenAddTopicDialog } from '../../utils/events';
-import { sleep } from '../../utils/time';
-import BaseDialog from '../dialog/base-dialog';
-import DialogButtons from '../dialog/dialog-buttons';
-import DialogContainer from '../dialog/dialog-container';
-import DialogHeader from '../dialog/dialog-header';
-import Input from '../ui/input';
-import Seperator from '../ui/seperator';
-import { Toast } from '../toast';
+import { useMenuStore } from '../../../provider/stores';
+import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { db } from '../../../utils/database';
+import { eCloseAddTopicDialog, eOpenAddTopicDialog } from '../../../utils/events';
+import { sleep } from '../../../utils/time';
+import BaseDialog from '../../dialog/base-dialog';
+import DialogButtons from '../../dialog/dialog-buttons';
+import DialogContainer from '../../dialog/dialog-container';
+import DialogHeader from '../../dialog/dialog-header';
+import Input from '../../ui/input';
+import Seperator from '../../ui/seperator';
+import { Toast } from '../../toast';
export class AddTopicDialog extends React.Component {
constructor(props) {
diff --git a/apps/mobile/src/components/JumpToDialog/index.js b/apps/mobile/src/components/dialogs/jumptosection/index.js
similarity index 85%
rename from apps/mobile/src/components/JumpToDialog/index.js
rename to apps/mobile/src/components/dialogs/jumptosection/index.js
index 398c02b36..f9128c9de 100644
--- a/apps/mobile/src/components/JumpToDialog/index.js
+++ b/apps/mobile/src/components/dialogs/jumptosection/index.js
@@ -1,21 +1,19 @@
import React, { useEffect, useState } from 'react';
import { ScrollView, View } from 'react-native';
-import BaseDialog from '../dialog/base-dialog';
-import { PressableButton } from '../ui/pressable';
-import Seperator from '../ui/seperator';
-import { useTracked } from '../../provider';
-import { useMessageStore } from '../../provider/stores';
-import { DDS } from '../../services/DeviceDetection';
-import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
-import { getElevation } from '../../utils';
-import { eCloseJumpToDialog, eOpenJumpToDialog, eScrollEvent } from '../../utils/events';
-import { SIZE } from '../../utils/size';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
+import { useTracked } from '../../../provider';
+import { useMessageStore } from '../../../provider/stores';
+import { DDS } from '../../../services/DeviceDetection';
+import { eSubscribeEvent, eUnSubscribeEvent } from '../../../services/EventManager';
+import { getElevation } from '../../../utils';
+import { eCloseJumpToDialog, eOpenJumpToDialog, eScrollEvent } from '../../../utils/events';
+import { SIZE } from '../../../utils/size';
+import BaseDialog from '../../dialog/base-dialog';
+import { PressableButton } from '../../ui/pressable';
+import Paragraph from '../../ui/typography/paragraph';
const offsets = [];
let timeout = null;
-const JumpToDialog = ({ scrollRef, data, type, screen }) => {
+const JumpToSectionDialog = ({ scrollRef, data, type, screen }) => {
const [state] = useTracked();
const { colors } = state;
const notes = data;
@@ -157,4 +155,4 @@ const JumpToDialog = ({ scrollRef, data, type, screen }) => {
);
};
-export default JumpToDialog;
+export default JumpToSectionDialog;
diff --git a/apps/mobile/src/components/ResultDialog/ProFeatures.js b/apps/mobile/src/components/dialogs/result/ProFeatures.js
similarity index 84%
rename from apps/mobile/src/components/ResultDialog/ProFeatures.js
rename to apps/mobile/src/components/dialogs/result/ProFeatures.js
index 51653c206..bf95b576b 100644
--- a/apps/mobile/src/components/ResultDialog/ProFeatures.js
+++ b/apps/mobile/src/components/dialogs/result/ProFeatures.js
@@ -1,12 +1,16 @@
import React from 'react';
import { View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import { useTracked } from '../../provider';
-import { eSendEvent } from '../../services/EventManager';
-import { eCloseProgressDialog, eCloseResultDialog, eOpenPremiumDialog } from '../../utils/events';
-import { SIZE } from '../../utils/size';
-import { sleep } from '../../utils/time';
-import Paragraph from '../ui/typography/paragraph';
+import { useTracked } from '../../../provider';
+import { eSendEvent } from '../../../services/EventManager';
+import {
+ eCloseProgressDialog,
+ eCloseResultDialog,
+ eOpenPremiumDialog
+} from '../../../utils/events';
+import { SIZE } from '../../../utils/size';
+import { sleep } from '../../../utils/time';
+import Paragraph from '../../ui/typography/paragraph';
export const ProFeatures = ({ count = 6 }) => {
const [state, dispatch] = useTracked();
const { colors } = state;
diff --git a/apps/mobile/src/components/ResultDialog/index.js b/apps/mobile/src/components/dialogs/result/index.js
similarity index 82%
rename from apps/mobile/src/components/ResultDialog/index.js
rename to apps/mobile/src/components/dialogs/result/index.js
index 399939485..05f4675bd 100644
--- a/apps/mobile/src/components/ResultDialog/index.js
+++ b/apps/mobile/src/components/dialogs/result/index.js
@@ -1,16 +1,16 @@
import React, { useEffect, useState } from 'react';
import { View } from 'react-native';
-import { useTracked } from '../../provider';
-import { DDS } from '../../services/DeviceDetection';
-import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
-import { getElevation } from '../../utils';
-import { eCloseResultDialog, eOpenResultDialog } from '../../utils/events';
-import { SIZE } from '../../utils/size';
-import { Button } from '../ui/button';
-import BaseDialog from '../dialog/base-dialog';
-import Seperator from '../ui/seperator';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
+import { useTracked } from '../../../provider';
+import { DDS } from '../../../services/DeviceDetection';
+import { eSubscribeEvent, eUnSubscribeEvent } from '../../../services/EventManager';
+import { getElevation } from '../../../utils';
+import { eCloseResultDialog, eOpenResultDialog } from '../../../utils/events';
+import { SIZE } from '../../../utils/size';
+import { Button } from '../../ui/button';
+import BaseDialog from '../../dialog/base-dialog';
+import Seperator from '../../ui/seperator';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
import { ProFeatures } from './pro-features';
const ResultDialog = () => {
diff --git a/apps/mobile/src/components/VaultDialog/index.js b/apps/mobile/src/components/dialogs/vault/index.js
similarity index 95%
rename from apps/mobile/src/components/VaultDialog/index.js
rename to apps/mobile/src/components/dialogs/vault/index.js
index d5f4234f1..599971d75 100644
--- a/apps/mobile/src/components/VaultDialog/index.js
+++ b/apps/mobile/src/components/dialogs/vault/index.js
@@ -2,37 +2,37 @@ import Clipboard from '@react-native-clipboard/clipboard';
import React, { Component, createRef } from 'react';
import { InteractionManager, View } from 'react-native';
import Share from 'react-native-share';
-import { notesnook } from '../../../e2e/test.ids';
-import BiometricService from '../../services/BiometricService';
-import { DDS } from '../../services/DeviceDetection';
+import { notesnook } from '../../../../e2e/test.ids';
+import BiometricService from '../../../services/BiometricService';
+import { DDS } from '../../../services/DeviceDetection';
import {
eSendEvent,
eSubscribeEvent,
eUnSubscribeEvent,
ToastEvent
-} from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { getElevation, toTXT } from '../../utils';
-import { db } from '../../utils/database';
+} from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { getElevation, toTXT } from '../../../utils';
+import { db } from '../../../utils/database';
import {
eClearEditor,
eCloseActionSheet,
eCloseVaultDialog,
eOnLoadNote,
eOpenVaultDialog
-} from '../../utils/events';
-import { deleteItems } from '../../utils/functions';
-import { tabBarRef } from '../../utils/global-refs';
-import { sleep } from '../../utils/time';
-import { getNote } from '../../views/Editor/Functions';
-import { Button } from '../ui/button';
-import BaseDialog from '../dialog/base-dialog';
-import DialogButtons from '../dialog/dialog-buttons';
-import DialogHeader from '../dialog/dialog-header';
-import Input from '../ui/input';
-import Seperator from '../ui/seperator';
-import { Toast } from '../toast';
-import Paragraph from '../ui/typography/paragraph';
+} from '../../../utils/events';
+import { deleteItems } from '../../../utils/functions';
+import { tabBarRef } from '../../../utils/global-refs';
+import { sleep } from '../../../utils/time';
+import { getNote } from '../../../screens/editor/Functions';
+import { Button } from '../../ui/button';
+import BaseDialog from '../../dialog/base-dialog';
+import DialogButtons from '../../dialog/dialog-buttons';
+import DialogHeader from '../../dialog/dialog-header';
+import Input from '../../ui/input';
+import Seperator from '../../ui/seperator';
+import { Toast } from '../../toast';
+import Paragraph from '../../ui/typography/paragraph';
let Keychain;
const passInputRef = createRef();
@@ -124,7 +124,7 @@ export class VaultDialog extends Component {
/**
*
- * @param {import('../../services/EventManager').vaultType} data
+ * @param {import('../../../services/EventManager').vaultType} data
*/
open = async data => {
if (!Keychain) {
diff --git a/apps/mobile/src/components/intro/index.js b/apps/mobile/src/components/intro/index.js
index fd4e9835c..bbd33383d 100644
--- a/apps/mobile/src/components/intro/index.js
+++ b/apps/mobile/src/components/intro/index.js
@@ -11,7 +11,7 @@ import umami from '../../utils/analytics';
import { MMKV } from '../../utils/database/mmkv';
import { SIZE } from '../../utils/size';
import { sleep } from '../../utils/time';
-import AppLock from '../../views/Settings/app-lock';
+import AppLock from '../../screens/settings/app-lock';
import { Button } from '../ui/button';
import { SvgView } from '../ui/svg';
import { BouncingView } from '../ui/transitions/bouncing-view';
diff --git a/apps/mobile/src/components/launcher/index.js b/apps/mobile/src/components/launcher/index.js
index 6204ba821..35bd8430c 100644
--- a/apps/mobile/src/components/launcher/index.js
+++ b/apps/mobile/src/components/launcher/index.js
@@ -28,7 +28,7 @@ import { MMKV } from '../../utils/database/mmkv';
import { tabBarRef } from '../../utils/global-refs';
import { SIZE } from '../../utils/size';
import { sleep } from '../../utils/time';
-import SettingsBackupAndRestore from '../../views/Settings/backup-restore';
+import SettingsBackupAndRestore from '../../screens/settings/backup-restore';
import { IconButton } from '../ui/icon-button';
import { Button } from '../ui/button';
import Input from '../ui/input';
@@ -38,7 +38,7 @@ import Seperator from '../ui/seperator';
import Intro from '../intro';
import Heading from '../ui/typography/heading';
import Paragraph from '../ui/typography/paragraph';
-import { Update } from '../update';
+import { Update } from '../sheets/update';
let passwordValue = null;
let didVerifyUser = false;
diff --git a/apps/mobile/src/components/list/index.js b/apps/mobile/src/components/list/index.js
index 88befb4cd..116bae5cd 100644
--- a/apps/mobile/src/components/list/index.js
+++ b/apps/mobile/src/components/list/index.js
@@ -7,7 +7,7 @@ import { eSendEvent } from '../../services/EventManager';
import Sync from '../../services/Sync';
import { db } from '../../utils/database';
import { eScrollEvent } from '../../utils/events';
-import JumpToDialog from '../JumpToDialog';
+import JumpToSectionDialog from '../dialogs/jump-to-section';
import { NotebookWrapper } from '../list-items/notebook/wrapper';
import { NoteWrapper } from '../list-items/note/wrapper';
import TagItem from '../list-items/tag';
@@ -176,7 +176,7 @@ const List = ({
</>
}
/>
- <JumpToDialog
+ <JumpToSectionDialog
screen={screen}
data={listData}
type={screen === 'Notes' ? 'home' : type}
diff --git a/apps/mobile/src/components/listitems/headers/header.js b/apps/mobile/src/components/listitems/headers/header.js
index dcfdcdbad..0a53b5ec4 100644
--- a/apps/mobile/src/components/listitems/headers/header.js
+++ b/apps/mobile/src/components/listitems/headers/header.js
@@ -3,7 +3,7 @@ import { View } from 'react-native';
import { useTracked } from '../../../provider';
import { useMessageStore } from '../../../provider/stores';
import { COLORS_NOTE } from '../../../utils/color-scheme';
-import { Announcement } from '../../Announcements/announcement';
+import { Announcement } from '../../announcements/announcement';
import { Card } from '../../list/card';
export const Header = React.memo(
diff --git a/apps/mobile/src/components/listitems/headers/sectionheader.js b/apps/mobile/src/components/listitems/headers/sectionheader.js
index a24cbedbe..5d44c7ded 100644
--- a/apps/mobile/src/components/listitems/headers/sectionheader.js
+++ b/apps/mobile/src/components/listitems/headers/sectionheader.js
@@ -16,7 +16,7 @@ import { eOpenJumpToDialog } from '../../../utils/events';
import { SIZE } from '../../../utils/size';
import { IconButton } from '../../ui/icon-button';
import { Button } from '../../ui/button';
-import Sort from '../../sort';
+import Sort from '../../sheets/sort';
import Heading from '../../ui/typography/heading';
export const SectionHeader = ({ item, index, type, color, screen }) => {
diff --git a/apps/mobile/src/components/MergeEditor/index.js b/apps/mobile/src/components/mergeconflicts/index.js
similarity index 99%
rename from apps/mobile/src/components/MergeEditor/index.js
rename to apps/mobile/src/components/mergeconflicts/index.js
index bef5fad34..17535c0b5 100644
--- a/apps/mobile/src/components/MergeEditor/index.js
+++ b/apps/mobile/src/components/mergeconflicts/index.js
@@ -21,7 +21,7 @@ import { eApplyChanges, eShowMergeDialog, refreshNotesPage } from '../../utils/e
import { openLinkInBrowser } from '../../utils/functions';
import { normalize, SIZE } from '../../utils/size';
import { timeConverter } from '../../utils/time';
-import { getNote, sourceUri, updateNoteInEditor } from '../../views/Editor/Functions';
+import { getNote, sourceUri, updateNoteInEditor } from '../../screens/editor/Functions';
import { IconButton } from '../ui/icon-button';
import { Button } from '../ui/button';
import BaseDialog from '../dialog/base-dialog';
@@ -49,7 +49,7 @@ function onMediaLoaded({ hash, src }) {
secondaryWebView.current?.injectJavaScript(inject);
}
-const MergeEditor = () => {
+const MergeConflicts = () => {
const [state, dispatch] = useTracked();
const { colors } = state;
const [visible, setVisible] = useState(false);
@@ -574,4 +574,4 @@ const MergeEditor = () => {
);
};
-export default MergeEditor;
+export default MergeConflicts;
diff --git a/apps/mobile/src/components/NoteHistory/index.js b/apps/mobile/src/components/notehistory/index.js
similarity index 100%
rename from apps/mobile/src/components/NoteHistory/index.js
rename to apps/mobile/src/components/notehistory/index.js
diff --git a/apps/mobile/src/components/NoteHistory/preview.js b/apps/mobile/src/components/notehistory/preview.js
similarity index 97%
rename from apps/mobile/src/components/NoteHistory/preview.js
rename to apps/mobile/src/components/notehistory/preview.js
index e8fb6970e..4ad1a5175 100644
--- a/apps/mobile/src/components/NoteHistory/preview.js
+++ b/apps/mobile/src/components/notehistory/preview.js
@@ -9,8 +9,8 @@ import { db } from '../../utils/database';
import { eCloseProgressDialog, eOnLoadNote } from '../../utils/events';
import { openLinkInBrowser } from '../../utils/functions';
import { normalize } from '../../utils/size';
-import { getNote, sourceUri } from '../../views/Editor/Functions';
-import tiny from '../../views/Editor/tiny/tiny';
+import { getNote, sourceUri } from '../../screens/editor/Functions';
+import tiny from '../../screens/editor/tiny/tiny';
import { IconButton } from '../ui/icon-button';
import { Button } from '../ui/button';
import DialogHeader from '../dialog/dialog-header';
diff --git a/apps/mobile/src/components/premium/premiumtoast.js b/apps/mobile/src/components/premium/premiumtoast.js
index 727641a69..ca9669b9f 100644
--- a/apps/mobile/src/components/premium/premiumtoast.js
+++ b/apps/mobile/src/components/premium/premiumtoast.js
@@ -8,8 +8,8 @@ import { dWidth, editing, getElevation } from '../../utils';
import { eCloseActionSheet, eOpenPremiumDialog, eShowGetPremium } from '../../utils/events';
import { SIZE } from '../../utils/size';
import { sleep } from '../../utils/time';
-import { EditorWebView } from '../../views/Editor/Functions';
-import tiny from '../../views/Editor/tiny/tiny';
+import { EditorWebView } from '../../screens/editor/Functions';
+import tiny from '../../screens/editor/tiny/tiny';
import { Button } from '../ui/button';
import Heading from '../ui/typography/heading';
import Paragraph from '../ui/typography/paragraph';
diff --git a/apps/mobile/src/components/sheetprovider/index.js b/apps/mobile/src/components/sheetprovider/index.js
index 64d3136f5..5d5aa722c 100644
--- a/apps/mobile/src/components/sheetprovider/index.js
+++ b/apps/mobile/src/components/sheetprovider/index.js
@@ -7,9 +7,9 @@ import { editing } from '../../utils';
import { eCloseProgressDialog, eOpenProgressDialog } from '../../utils/events';
import { SIZE } from '../../utils/size';
import { sleep } from '../../utils/time';
-import { EditorWebView } from '../../views/Editor/Functions';
-import tiny from '../../views/Editor/tiny/tiny';
-import { reFocusEditor } from '../../views/Editor/tiny/toolbar/constants';
+import { EditorWebView } from '../../screens/editor/Functions';
+import tiny from '../../screens/editor/tiny/tiny';
+import { reFocusEditor } from '../../screens/editor/tiny/toolbar/constants';
import { Button } from '../ui/button';
import SheetWrapper from '../ui/sheet';
import Heading from '../ui/typography/heading';
diff --git a/apps/mobile/src/components/AddNotebookDialog/index.js b/apps/mobile/src/components/sheets/addnotebook/index.js
similarity index 94%
rename from apps/mobile/src/components/AddNotebookDialog/index.js
rename to apps/mobile/src/components/sheets/addnotebook/index.js
index d80146c73..a497304ae 100644
--- a/apps/mobile/src/components/AddNotebookDialog/index.js
+++ b/apps/mobile/src/components/sheets/addnotebook/index.js
@@ -1,27 +1,27 @@
import React, { createRef } from 'react';
import { Keyboard, StyleSheet, TextInput, TouchableOpacity, View } from 'react-native';
import { FlatList } from 'react-native-gesture-handler';
-import { notesnook } from '../../../e2e/test.ids';
-import { useMenuStore } from '../../provider/stores';
-import { DDS } from '../../services/DeviceDetection';
-import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { db } from '../../utils/database';
-import { eCloseAddNotebookDialog, eOpenAddNotebookDialog } from '../../utils/events';
-import { ph, pv, SIZE } from '../../utils/size';
-import { sleep } from '../../utils/time';
-import { IconButton } from '../ui/icon-button';
-import { Button } from '../ui/button';
-import DialogHeader from '../dialog/dialog-header';
-import Input from '../ui/input';
-import { MoveNotes } from '../MoveNoteDialog/movenote';
-import Seperator from '../ui/seperator';
-import SheetWrapper from '../ui/sheet';
-import { Toast } from '../toast';
+import { notesnook } from '../../../../e2e/test.ids';
+import { useMenuStore } from '../../../provider/stores';
+import { DDS } from '../../../services/DeviceDetection';
+import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { db } from '../../../utils/database';
+import { eCloseAddNotebookDialog, eOpenAddNotebookDialog } from '../../../utils/events';
+import { ph, pv, SIZE } from '../../../utils/size';
+import { sleep } from '../../../utils/time';
+import { IconButton } from '../../ui/icon-button';
+import { Button } from '../../ui/button';
+import DialogHeader from '../../dialog/dialog-header';
+import Input from '../../ui/input';
+import { MoveNotes } from '../move-notes/movenote';
+import Seperator from '../../ui/seperator';
+import SheetWrapper from '../../ui/sheet';
+import { Toast } from '../../toast';
let refs = [];
-export class AddNotebookDialog extends React.Component {
+export class AddNotebookSheet extends React.Component {
constructor(props) {
super(props);
this.state = {
diff --git a/apps/mobile/src/components/MoveNoteDialog/index.js b/apps/mobile/src/components/sheets/addto/index.js
similarity index 91%
rename from apps/mobile/src/components/MoveNoteDialog/index.js
rename to apps/mobile/src/components/sheets/addto/index.js
index ae8ebb2d4..1d5e8150d 100644
--- a/apps/mobile/src/components/MoveNoteDialog/index.js
+++ b/apps/mobile/src/components/sheets/addto/index.js
@@ -1,31 +1,31 @@
import React, { createRef, useEffect, useState } from 'react';
import { Keyboard, TouchableOpacity, View } from 'react-native';
import { FlatList } from 'react-native-gesture-handler';
-import { notesnook } from '../../../e2e/test.ids';
-import { useTracked } from '../../provider';
-import { useNotebookStore, useSelectionStore } from '../../provider/stores';
-import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { getTotalNotes } from '../../utils';
-import { db } from '../../utils/database';
-import { eOpenMoveNoteDialog } from '../../utils/events';
-import layoutmanager from '../../utils/layout-manager';
-import { SIZE } from '../../utils/size';
-import { IconButton } from '../ui/icon-button';
-import { Button } from '../ui/button';
-import { Dialog } from '../dialog';
-import DialogHeader from '../dialog/dialog-header';
-import { presentDialog } from '../dialog/functions';
-import Input from '../ui/input';
-import { PressableButton } from '../ui/pressable';
-import SheetWrapper from '../ui/sheet';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
+import { notesnook } from '../../../../e2e/test.ids';
+import { useTracked } from '../../../provider';
+import { useNotebookStore, useSelectionStore } from '../../../provider/stores';
+import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { getTotalNotes } from '../../../utils';
+import { db } from '../../../utils/database';
+import { eOpenMoveNoteDialog } from '../../../utils/events';
+import layoutmanager from '../../../utils/layout-manager';
+import { SIZE } from '../../../utils/size';
+import { IconButton } from '../../ui/icon-button';
+import { Button } from '../../ui/button';
+import { Dialog } from '../../dialog';
+import DialogHeader from '../../dialog/dialog-header';
+import { presentDialog } from '../../dialog/functions';
+import Input from '../../ui/input';
+import { PressableButton } from '../../ui/pressable';
+import SheetWrapper from '../../ui/sheet';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
let newNotebookTitle = null;
const notebookInput = createRef();
const actionSheetRef = createRef();
-const MoveNoteDialog = () => {
+const AddToNotebookSheet = () => {
const [visible, setVisible] = useState(false);
const [note, setNote] = useState(null);
@@ -69,7 +69,7 @@ const MoveNoteDialog = () => {
);
};
-export default MoveNoteDialog;
+export default AddToNotebookSheet;
const MoveNoteComponent = ({ close, note, setNote }) => {
const [state, dispatch] = useTracked();
diff --git a/apps/mobile/src/components/ExportDialog/index.js b/apps/mobile/src/components/sheets/exportnotes/index.js
similarity index 90%
rename from apps/mobile/src/components/ExportDialog/index.js
rename to apps/mobile/src/components/sheets/exportnotes/index.js
index cf7ef41ec..66a512b14 100644
--- a/apps/mobile/src/components/ExportDialog/index.js
+++ b/apps/mobile/src/components/sheets/exportnotes/index.js
@@ -3,25 +3,25 @@ import { Platform, StyleSheet, View } from 'react-native';
import FileViewer from 'react-native-file-viewer';
import Share from 'react-native-share';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import { notesnook } from '../../../e2e/test.ids';
-import { useTracked } from '../../provider';
-import { ToastEvent } from '../../services/EventManager';
-import Exporter from '../../services/Exporter';
-import { getElevation } from '../../utils';
-import { ph, pv, SIZE } from '../../utils/size';
-import { sleep } from '../../utils/time';
-import SheetWrapper from '../ui/sheet';
-import { Button } from '../ui/button';
-import DialogHeader from '../dialog/dialog-header';
-import { PressableButton } from '../ui/pressable';
-import Seperator from '../ui/seperator';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
+import { notesnook } from '../../../../e2e/test.ids';
+import { useTracked } from '../../../provider';
+import { ToastEvent } from '../../../services/EventManager';
+import Exporter from '../../../services/Exporter';
+import { getElevation } from '../../../utils';
+import { ph, pv, SIZE } from '../../../utils/size';
+import { sleep } from '../../../utils/time';
+import SheetWrapper from '../../ui/sheet';
+import { Button } from '../../ui/button';
+import DialogHeader from '../../dialog/dialog-header';
+import { PressableButton } from '../../ui/pressable';
+import Seperator from '../../ui/seperator';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
-const { eSubscribeEvent, eUnSubscribeEvent } = require('../../services/EventManager');
-const { eOpenExportDialog, eCloseExportDialog } = require('../../utils/events');
+const { eSubscribeEvent, eUnSubscribeEvent } = require('../../../services/EventManager');
+const { eOpenExportDialog, eCloseExportDialog } = require('../../../utils/events');
-const ExportDialog = () => {
+const ExportNotesSheet = () => {
const [state] = useTracked();
const { colors } = state;
@@ -294,4 +294,4 @@ const styles = StyleSheet.create({
}
});
-export default ExportDialog;
+export default ExportNotesSheet;
diff --git a/apps/mobile/src/components/ExportDialog/share.js b/apps/mobile/src/components/sheets/exportnotes/share.js
similarity index 89%
rename from apps/mobile/src/components/ExportDialog/share.js
rename to apps/mobile/src/components/sheets/exportnotes/share.js
index b775d891d..319bd68a4 100644
--- a/apps/mobile/src/components/ExportDialog/share.js
+++ b/apps/mobile/src/components/sheets/exportnotes/share.js
@@ -2,9 +2,9 @@ import React from 'react';
import { View } from 'react-native';
import FileViewer from 'react-native-file-viewer';
import Share from 'react-native-share';
-import { ToastEvent } from '../../services/EventManager';
-import { SIZE } from '../../utils/size';
-import { Button } from '../ui/button';
+import { ToastEvent } from '../../../services/EventManager';
+import { SIZE } from '../../../utils/size';
+import { Button } from '../../ui/button';
export const ShareComponent = ({ uri, name, padding }) => {
return (
diff --git a/apps/mobile/src/components/Github/issue.js b/apps/mobile/src/components/sheets/github/issue.js
similarity index 86%
rename from apps/mobile/src/components/Github/issue.js
rename to apps/mobile/src/components/sheets/github/issue.js
index 5e4dc7053..d357766cc 100644
--- a/apps/mobile/src/components/Github/issue.js
+++ b/apps/mobile/src/components/sheets/github/issue.js
@@ -1,21 +1,21 @@
import Clipboard from '@react-native-clipboard/clipboard';
import React, { useRef, useState } from 'react';
import { Linking, Platform, Text, TextInput, View } from 'react-native';
-import { useTracked } from '../../provider';
-import { useUserStore } from '../../provider/stores';
-import { eSendEvent, ToastEvent } from '../../services/EventManager';
-import PremiumService from '../../services/PremiumService';
-import { APP_VERSION } from '../../../version';
-import { db } from '../../utils/database';
-import { eCloseProgressDialog } from '../../utils/events';
-import { openLinkInBrowser } from '../../utils/functions';
-import { SIZE } from '../../utils/size';
-import { sleep } from '../../utils/time';
-import { Button } from '../ui/button';
-import DialogHeader from '../dialog/dialog-header';
-import { presentDialog } from '../dialog/functions';
-import Seperator from '../ui/seperator';
-import Paragraph from '../ui/typography/paragraph';
+import { useTracked } from '../../../provider';
+import { useUserStore } from '../../../provider/stores';
+import { eSendEvent, ToastEvent } from '../../../services/EventManager';
+import PremiumService from '../../../services/PremiumService';
+import { APP_VERSION } from '../../../../version';
+import { db } from '../../../utils/database';
+import { eCloseProgressDialog } from '../../../utils/events';
+import { openLinkInBrowser } from '../../../utils/functions';
+import { SIZE } from '../../../utils/size';
+import { sleep } from '../../../utils/time';
+import { Button } from '../../ui/button';
+import DialogHeader from '../../dialog/dialog-header';
+import { presentDialog } from '../../dialog/functions';
+import Seperator from '../../ui/seperator';
+import Paragraph from '../../ui/typography/paragraph';
import deviceInfoModule from 'react-native-device-info';
export const Issue = () => {
diff --git a/apps/mobile/src/components/TagsDialog/index.js b/apps/mobile/src/components/sheets/managetags/index.js
similarity index 90%
rename from apps/mobile/src/components/TagsDialog/index.js
rename to apps/mobile/src/components/sheets/managetags/index.js
index e2200f2a8..951ea5900 100644
--- a/apps/mobile/src/components/TagsDialog/index.js
+++ b/apps/mobile/src/components/sheets/managetags/index.js
@@ -1,20 +1,20 @@
import React, { useEffect, useRef, useState } from 'react';
import { ScrollView, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import { useTracked } from '../../provider';
-import { useTagStore } from '../../provider/stores';
-import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { db } from '../../utils/database';
-import { eCloseTagsDialog, eOpenTagsDialog } from '../../utils/events';
-import { SIZE } from '../../utils/size';
-import { sleep } from '../../utils/time';
-import Input from '../ui/input';
-import { PressableButton } from '../ui/pressable';
-import SheetWrapper from '../ui/sheet';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
-const TagsDialog = () => {
+import { useTracked } from '../../../provider';
+import { useTagStore } from '../../../provider/stores';
+import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { db } from '../../../utils/database';
+import { eCloseTagsDialog, eOpenTagsDialog } from '../../../utils/events';
+import { SIZE } from '../../../utils/size';
+import { sleep } from '../../../utils/time';
+import Input from '../../ui/input';
+import { PressableButton } from '../../ui/pressable';
+import SheetWrapper from '../../ui/sheet';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
+const ManageTagsSheet = () => {
const [state] = useTracked();
const colors = state.colors;
const [visible, setVisible] = useState(false);
@@ -213,7 +213,7 @@ const TagsDialog = () => {
);
};
-export default TagsDialog;
+export default ManageTagsSheet;
const TagItem = ({ tag, note, setNote }) => {
const [state] = useTracked();
diff --git a/apps/mobile/src/components/MoveNoteDialog/movenote.tsx b/apps/mobile/src/components/sheets/movenotes/movenote.tsx
similarity index 90%
rename from apps/mobile/src/components/MoveNoteDialog/movenote.tsx
rename to apps/mobile/src/components/sheets/movenotes/movenote.tsx
index c955fdf93..6cd745f9b 100644
--- a/apps/mobile/src/components/MoveNoteDialog/movenote.tsx
+++ b/apps/mobile/src/components/sheets/movenotes/movenote.tsx
@@ -2,21 +2,21 @@ import React, { RefObject, useState } from 'react';
import { View } from 'react-native';
import ActionSheet from 'react-native-actions-sheet';
import { FlatList } from 'react-native-gesture-handler';
-import { useTracked } from '../../provider';
-import { eSendEvent, presentSheet, ToastEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { db } from '../../utils/database';
-import { eCloseProgressDialog } from '../../utils/events';
-import { SIZE } from '../../utils/size';
-import { IconButton } from '../ui/icon-button';
-import { Button } from '../ui/button';
-import { Dialog } from '../dialog';
-import DialogHeader from '../dialog/dialog-header';
-import { presentDialog } from '../dialog/functions';
-import { PressableButton } from '../ui/pressable';
-import Seperator from '../ui/seperator';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
+import { useTracked } from '../../../provider';
+import { eSendEvent, presentSheet, ToastEvent } from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { db } from '../../../utils/database';
+import { eCloseProgressDialog } from '../../../utils/events';
+import { SIZE } from '../../../utils/size';
+import { IconButton } from '../../ui/icon-button';
+import { Button } from '../../ui/button';
+import { Dialog } from '../../dialog';
+import DialogHeader from '../../dialog/dialog-header';
+import { presentDialog } from '../../dialog/functions';
+import { PressableButton } from '../../ui/pressable';
+import Seperator from '../../ui/seperator';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
export const MoveNotes = ({
notebook,
diff --git a/apps/mobile/src/components/PublishNoteDialog/index.js b/apps/mobile/src/components/sheets/publishnote/index.js
similarity index 92%
rename from apps/mobile/src/components/PublishNoteDialog/index.js
rename to apps/mobile/src/components/sheets/publishnote/index.js
index d71b92ea0..7caa94d4b 100644
--- a/apps/mobile/src/components/PublishNoteDialog/index.js
+++ b/apps/mobile/src/components/sheets/publishnote/index.js
@@ -1,27 +1,26 @@
+import Clipboard from '@react-native-clipboard/clipboard';
import React, { useEffect, useRef, useState } from 'react';
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import Clipboard from '@react-native-clipboard/clipboard';
-import { useTracked } from '../../provider';
-import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { db } from '../../utils/database';
-import { eClosePublishNoteDialog, eOpenPublishNoteDialog } from '../../utils/events';
-import { openLinkInBrowser } from '../../utils/functions';
-import { SIZE } from '../../utils/size';
-import { IconButton } from '../ui/icon-button';
-import SheetWrapper from '../ui/sheet';
-import { Button } from '../ui/button';
-import DialogHeader from '../dialog/dialog-header';
-import Input from '../ui/input';
-import Seperator from '../ui/seperator';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
-import { useAttachmentStore } from '../../provider/stores';
-import { editing } from '../../utils';
+import { useTracked } from '../../../provider';
+import { useAttachmentStore } from '../../../provider/stores';
+import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { db } from '../../../utils/database';
+import { eClosePublishNoteDialog, eOpenPublishNoteDialog } from '../../../utils/events';
+import { openLinkInBrowser } from '../../../utils/functions';
+import { SIZE } from '../../../utils/size';
+import DialogHeader from '../../dialog/dialog-header';
+import { Button } from '../../ui/button';
+import { IconButton } from '../../ui/icon-button';
+import Input from '../../ui/input';
+import Seperator from '../../ui/seperator';
+import SheetWrapper from '../../ui/sheet';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
let passwordValue = null;
-const PublishNoteDialog = () => {
+const PublishNoteSheet = () => {
const [state] = useTracked();
const colors = state.colors;
const [visible, setVisible] = useState(false);
@@ -358,4 +357,4 @@ const PublishNoteDialog = () => {
);
};
-export default PublishNoteDialog;
+export default PublishNoteSheet;
diff --git a/apps/mobile/src/components/RateDialog/index.js b/apps/mobile/src/components/sheets/rateapp/index.js
similarity index 81%
rename from apps/mobile/src/components/RateDialog/index.js
rename to apps/mobile/src/components/sheets/rateapp/index.js
index 15947480c..0115cc05d 100644
--- a/apps/mobile/src/components/RateDialog/index.js
+++ b/apps/mobile/src/components/sheets/rateapp/index.js
@@ -1,18 +1,18 @@
import React, { useEffect, useRef, useState } from 'react';
import { Linking, Platform, View } from 'react-native';
-import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
-import { eCloseRateDialog, eOpenRateDialog } from '../../utils/events';
-import { MMKV } from '../../utils/database/mmkv';
-import { SIZE } from '../../utils/size';
-import SheetWrapper from '../ui/sheet';
-import { Button } from '../ui/button';
-import Seperator from '../ui/seperator';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
-import { STORE_LINK } from '../../utils/constants';
-import { clearMessage } from '../../services/Message';
+import { eSubscribeEvent, eUnSubscribeEvent } from '../../../services/EventManager';
+import { eCloseRateDialog, eOpenRateDialog } from '../../../utils/events';
+import { MMKV } from '../../../utils/database/mmkv';
+import { SIZE } from '../../../utils/size';
+import SheetWrapper from '../../ui/sheet';
+import { Button } from '../../ui/button';
+import Seperator from '../../ui/seperator';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
+import { STORE_LINK } from '../../../utils/constants';
+import { clearMessage } from '../../../services/Message';
-const RateDialog = () => {
+const RateAppSheet = () => {
const [visible, setVisible] = useState(false);
const actionSheetRef = useRef();
@@ -125,4 +125,4 @@ const RateDialog = () => {
);
};
-export default RateDialog;
+export default RateAppSheet;
diff --git a/apps/mobile/src/components/RecoveryKeyDialog/index.js b/apps/mobile/src/components/sheets/recoverykey/index.js
similarity index 90%
rename from apps/mobile/src/components/RecoveryKeyDialog/index.js
rename to apps/mobile/src/components/sheets/recoverykey/index.js
index facc5362f..594034027 100644
--- a/apps/mobile/src/components/RecoveryKeyDialog/index.js
+++ b/apps/mobile/src/components/sheets/recoverykey/index.js
@@ -5,25 +5,25 @@ import FileViewer from 'react-native-file-viewer';
import QRCode from 'react-native-qrcode-svg';
import * as ScopedStorage from 'react-native-scoped-storage';
import Share from 'react-native-share';
-import { LOGO_BASE64 } from '../../assets/images/assets';
-import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../services/EventManager';
-import { clearMessage } from '../../services/Message';
-import { db } from '../../utils/database';
-import { eOpenRecoveryKeyDialog } from '../../utils/events';
-import { MMKV } from '../../utils/database/mmkv';
-import { sanitizeFilename } from '../../utils/sanitizer';
-import { SIZE } from '../../utils/size';
-import Storage from '../../utils/database/storage';
-import { sleep } from '../../utils/time';
-import { Button } from '../ui/button';
-import DialogHeader from '../dialog/dialog-header';
-import Seperator from '../ui/seperator';
-import SheetWrapper from '../ui/sheet';
-import Paragraph from '../ui/typography/paragraph';
+import { LOGO_BASE64 } from '../../../assets/images/assets';
+import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../../services/EventManager';
+import { clearMessage } from '../../../services/Message';
+import { db } from '../../../utils/database';
+import { eOpenRecoveryKeyDialog } from '../../../utils/events';
+import { MMKV } from '../../../utils/database/mmkv';
+import { sanitizeFilename } from '../../../utils/sanitizer';
+import { SIZE } from '../../../utils/size';
+import Storage from '../../../utils/database/storage';
+import { sleep } from '../../../utils/time';
+import { Button } from '../../ui/button';
+import DialogHeader from '../../dialog/dialog-header';
+import Seperator from '../../ui/seperator';
+import SheetWrapper from '../../ui/sheet';
+import Paragraph from '../../ui/typography/paragraph';
let RNFetchBlob;
-class RecoveryKeyDialog extends React.Component {
+class RecoveryKeySheet extends React.Component {
constructor(props) {
super(props);
this.state = {
@@ -325,4 +325,4 @@ class RecoveryKeyDialog extends React.Component {
}
}
-export default RecoveryKeyDialog;
+export default RecoveryKeySheet;
diff --git a/apps/mobile/src/components/RestoreDialog/index.js b/apps/mobile/src/components/sheets/restoredata/index.js
similarity index 93%
rename from apps/mobile/src/components/RestoreDialog/index.js
rename to apps/mobile/src/components/sheets/restoredata/index.js
index dd812753b..59a99874f 100644
--- a/apps/mobile/src/components/RestoreDialog/index.js
+++ b/apps/mobile/src/components/sheets/restoredata/index.js
@@ -2,29 +2,28 @@ import React, { createRef, useEffect, useState } from 'react';
import { ActivityIndicator, Platform, View } from 'react-native';
import DocumentPicker from 'react-native-document-picker';
import { FlatList } from 'react-native-gesture-handler';
-import { useTracked } from '../../provider';
-import { initialize } from '../../provider/stores';
-import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../services/EventManager';
-import { db } from '../../utils/database';
-import { eCloseRestoreDialog, eOpenRestoreDialog } from '../../utils/events';
-import { MMKV } from '../../utils/database/mmkv';
-import { SIZE } from '../../utils/size';
-import storage from '../../utils/database/storage';
-import { sleep, timeConverter } from '../../utils/time';
-import SheetWrapper from '../ui/sheet';
-import { Button } from '../ui/button';
-import DialogHeader from '../dialog/dialog-header';
-import Seperator from '../ui/seperator';
-import Paragraph from '../ui/typography/paragraph';
import * as ScopedStorage from 'react-native-scoped-storage';
-import { Dialog } from '../dialog';
-import { verifyUser } from '../../views/Settings/functions';
-import { presentDialog } from '../dialog/functions';
-import { Toast } from '../toast';
+import { useTracked } from '../../../provider';
+import { initialize } from '../../../provider/stores';
+import { eSubscribeEvent, eUnSubscribeEvent, ToastEvent } from '../../../services/EventManager';
+import { db } from '../../../utils/database';
+import { MMKV } from '../../../utils/database/mmkv';
+import storage from '../../../utils/database/storage';
+import { eCloseRestoreDialog, eOpenRestoreDialog } from '../../../utils/events';
+import { SIZE } from '../../../utils/size';
+import { sleep, timeConverter } from '../../../utils/time';
+import { Dialog } from '../../dialog';
+import DialogHeader from '../../dialog/dialog-header';
+import { presentDialog } from '../../dialog/functions';
+import { Toast } from '../../toast';
+import { Button } from '../../ui/button';
+import Seperator from '../../ui/seperator';
+import SheetWrapper from '../../ui/sheet';
+import Paragraph from '../../ui/typography/paragraph';
const actionSheetRef = createRef();
let RNFetchBlob;
-const RestoreDialog = () => {
+const RestoreDataSheet = () => {
const [visible, setVisible] = useState(false);
const [restoring, setRestoring] = useState(false);
useEffect(() => {
@@ -75,7 +74,7 @@ const RestoreDialog = () => {
);
};
-export default RestoreDialog;
+export default RestoreDataSheet;
const RestoreDataComponent = ({ close, setRestoring, restoring }) => {
const [state, dispatch] = useTracked();
diff --git a/apps/mobile/src/components/sort/index.js b/apps/mobile/src/components/sheets/sort/index.js
similarity index 90%
rename from apps/mobile/src/components/sort/index.js
rename to apps/mobile/src/components/sheets/sort/index.js
index 3100ab2b7..0cec7cae1 100644
--- a/apps/mobile/src/components/sort/index.js
+++ b/apps/mobile/src/components/sheets/sort/index.js
@@ -1,16 +1,16 @@
import React, { useState } from 'react';
import { View } from 'react-native';
-import { useTracked } from '../../provider';
-import { eSendEvent } from '../../services/EventManager';
-import Navigation from '../../services/Navigation';
-import { GROUP, SORT } from '../../utils/constants';
-import { db } from '../../utils/database';
-import { refreshNotesPage } from '../../utils/events';
-import layoutmanager from '../../utils/layout-manager';
-import { SIZE } from '../../utils/size';
-import { Button } from '../ui/button';
-import Seperator from '../ui/seperator';
-import Heading from '../ui/typography/heading';
+import { useTracked } from '../../../provider';
+import { eSendEvent } from '../../../services/EventManager';
+import Navigation from '../../../services/Navigation';
+import { GROUP, SORT } from '../../../utils/constants';
+import { db } from '../../../utils/database';
+import { refreshNotesPage } from '../../../utils/events';
+import layoutmanager from '../../../utils/layout-manager';
+import { SIZE } from '../../../utils/size';
+import { Button } from '../../ui/button';
+import Seperator from '../../ui/seperator';
+import Heading from '../../ui/typography/heading';
const Sort = ({ type, screen }) => {
const [state] = useTracked();
diff --git a/apps/mobile/src/components/update/index.js b/apps/mobile/src/components/sheets/update/index.js
similarity index 96%
rename from apps/mobile/src/components/update/index.js
rename to apps/mobile/src/components/sheets/update/index.js
index b8b6ba5a5..e9ac81199 100644
--- a/apps/mobile/src/components/update/index.js
+++ b/apps/mobile/src/components/sheets/update/index.js
@@ -1,14 +1,14 @@
import React from 'react';
import { Linking, View } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
-import { useTracked } from '../../provider';
-import { STORE_LINK } from '../../utils/constants';
-import { SIZE } from '../../utils/size';
-import { Button } from '../ui/button';
-import { SvgView } from '../ui/svg';
-import Seperator from '../ui/seperator';
-import Heading from '../ui/typography/heading';
-import Paragraph from '../ui/typography/paragraph';
+import { useTracked } from '../../../provider';
+import { STORE_LINK } from '../../../utils/constants';
+import { SIZE } from '../../../utils/size';
+import { Button } from '../../ui/button';
+import { SvgView } from '../../ui/svg';
+import Seperator from '../../ui/seperator';
+import Heading from '../../ui/typography/heading';
+import Paragraph from '../../ui/typography/paragraph';
const UPDATE_SVG = color =>
`<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="774" height="669.5" viewBox="0 0 774 669.5" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M938.2145,322.3829C936.73266,207.5841,878.16775,115.25,806.13079,115.25c-43.29082,0-81.71777,33.346-105.81477,84.87331l28.33157,71.08654-39.15446-43.81576c-9.876,29.64743-15.48115,63.49569-15.48115,99.44475a324.20917,324.20917,0,0,0,9.98686,80.80891l75.92761-12.24058-67.9507,37.99628c22.13728,60.69069,62.59851,102.1414,109.23586,104.87608l-8.988,244.5184,27.81449.99338-5.94527-245.75716c66.41162-6.32443,119.60967-91.20375,123.8712-197.42794l-45.89372-25.66252Z" transform="translate(-213 -115.25)" fill="#f0f0f0"/><rect x="157.51532" y="354.40187" width="6.60151" height="49.25266" fill="${color}"/><polygon points="187.815 376.276 182.98 380.779 160.823 356.936 138.658 380.779 133.823 376.276 160.823 347.243 187.815 376.276" fill="${color}"/><path d="M371.9876,543.6602a52.8121,52.8121,0,1,1,52.8121-52.81209A52.87183,52.87183,0,0,1,371.9876,543.6602Zm0-99.02268a46.21059,46.21059,0,1,0,46.21058,46.21059A46.26275,46.26275,0,0,0,371.9876,444.63752Z" transform="translate(-213 -115.25)" fill="${color}"/><rect x="212.75248" y="253.9314" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="229.458 265.992 226.793 268.475 214.576 255.328 202.356 268.475 199.69 265.992 214.576 249.984 229.458 265.992" fill="#e4e4e4"/><path d="M426.56422,409.9859a29.118,29.118,0,1,1,29.118-29.118A29.15089,29.15089,0,0,1,426.56422,409.9859Zm0-54.59616A25.47821,25.47821,0,1,0,452.04243,380.868,25.507,25.507,0,0,0,426.56422,355.38974Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><rect x="99.52274" y="186.73872" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="116.229 198.799 113.563 201.282 101.346 188.136 89.126 201.282 86.46 198.799 101.346 182.792 116.229 198.799" fill="#e4e4e4"/><path d="M313.33448,342.79321a29.118,29.118,0,1,1,29.118-29.118A29.15088,29.15088,0,0,1,313.33448,342.79321Zm0-54.59615a25.47821,25.47821,0,1,0,25.47821,25.4782A25.507,25.507,0,0,0,313.33448,288.19706Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><path d="M518.7325,635.91942a8.22484,8.22484,0,0,1,.958-12.302,9.56322,9.56322,0,0,1,1.26081-.83521l-6.99347-30.13439,16.26512,5.84042,4.14749,27.72073a8.21849,8.21849,0,0,1-2.21462,10.58849A10.12952,10.12952,0,0,1,518.7325,635.91942Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M516.88531,612.40706l-.08727-.29605c-8.79267-29.805-17.88169-60.6154-28.97824-94.16236l-.0728-.21977.2448-.13088c6.18493-3.30762,15.48114-3.08736,21.62358.51183,5.68293,3.33,8.55569,9.77159,7.0024,15.68347l8.09328,38.67327c3.29039,12.64158,6.69574,25.72668,9.95036,38.62892l.09229.36576-.504.0295c-5.92592.34536-12.04821.70254-16.95322.89973Z" transform="translate(-213 -115.25)" fill="#ccc"/><polygon points="229.16 657.57 217.627 657.57 212.138 616.801 229.16 616.801 229.16 657.57" fill="#ffb8b8"/><path d="M445.10175,783.06559H407.9141v-.43107c0-7.31472,6.49345-13.26551,14.47493-13.26551h22.71272Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><polygon points="337.837 648.851 326.848 652.06 308.113 614.743 324.331 610.006 337.837 648.851" fill="#ffb8b8"/><path d="M521.60173,783.39141l-.14262-.41086c-2.42325-6.96953,1.79234-14.4459,9.39693-16.66692l21.64062-6.31955,4.53736,13.05Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><ellipse cx="279.46347" cy="354.21043" rx="23.10522" ry="21.17504" fill="#ffb8b8"/><path d="M502.83713,465.536c.13132-8.54065-3.76885-16.99907-9.79916-21.25171a16.77762,16.77762,0,0,0-19.87954.322c-5.937,4.44645-9.65428,13.02823-9.33974,21.56167C477.12124,466.20257,490.42379,466.23726,502.83713,465.536Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M448.74454,759.69687l-.46255-.04125c-10.03358-.90255-20.40891-1.83457-30.21419-1.9415l-.5333-.00589.07281-.48411c2.32311-15.42,3.30793-31.45044,4.26037-46.9538.9405-15.308,1.91269-31.13682,4.17769-46.17039.95818-4.0257,1.892-8.00342,2.82264-11.96682,7.70037-32.79837,14.97378-63.77816,29.98728-94.44433l.14194-.28963.34381.03789c14.08679,1.56221,27.62283,6.27241,38.11391,13.26256l.20326.13513-.00988.23027a131.25944,131.25944,0,0,0-.10174,14.17269,44.82523,44.82523,0,0,1,7.48241,42.489c4.13084,12.65215,8.40154,25.73075,12.75907,38.63212,10.5818,26.587,21.53153,54.10056,32.75594,81.99045l.1842.45717-.51791.11114c-8.07587,1.73775-16.40668,3.52938-24.62518,4.22482l-.31028.0261-.14745-.25174a587.30717,587.30717,0,0,1-50.88262-112.12662c-2.80473,7.83882-6.84508,14.91443-10.75934,21.76819a157.11556,157.11556,0,0,0-9.86087,19.31354c-1.73239,13.0365-2.192,27.16078-2.63591,40.81947-.42007,12.91442-.81671,25.11236-2.19312,36.582Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M484.57528,444.67592c10.01507-1.97751,21.093-.09617,28.95819,6.09651s11.85919,16.9058,8.62805,26.09364-14.20114,15.65236-24.12,13.27969c2.84131-7.33881-.35623-16.34918-7.302-20.57639C482.50242,464.55626,480.23475,452.58775,484.57528,444.67592Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M496.73471,571.62025l-.36633-.15281c-12.77629-5.34207-25.30408-9.441-37.04181-13.18089l-.35989-.07114-.00092-.95644.23358.07451c.04915-.09935.1045-.21217.16008-.32456.16031-.325.26963-.54642.36264-.69292l-.00252-.00126c.97862-1.82742,1.75651-3.59337,2.50868-5.30123.77628-1.76259,1.5776-3.58243,2.61295-5.50793a15.68833,15.68833,0,0,1-4.02289-17.95719c2.593-5.63211,9.20424-10.01859,16.15083-10.74644,2.54543-6.42185,8.21712-19.91552,8.21712-19.91552s11.92674-.30015,16.72316-.85793l.08062-.00926.07923.016c10.4711,2.10273,19.213,11.1834,21.25846,22.08265,1.72665,9.199-.89525,19.721-7.38227,29.62807A128.7532,128.7532,0,0,1,504.93,561.61682c-2.92186,3.34837-5.68157,6.51067-7.97367,9.69571Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M519.3919,459.10521v0Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M519.861,457.22412c-7.01076-.95907-12.51527-7.52688-11.71835-13.982s7.76344-11.72977,14.83079-11.22907,13.06654,6.694,12.77147,13.18459S528.81221,458.44864,519.861,457.22412Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M518.76646,453.03852c-7.01067-.95906-12.51516-7.52688-11.71821-13.98194.54524-4.41578,3.9788-8.27657,8.35539-10.11667-5.65378,1.13408-10.51956,5.64916-11.17757,10.97881-.79695,6.45506,4.70754,13.02288,11.71821,13.98195a14.465,14.465,0,0,0,7.6875-.98538A14.866,14.866,0,0,1,518.76646,453.03852Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M382.77632,566.82181a9.99626,9.99626,0,0,1,12.97554-3.271,9.61149,9.61149,0,0,1,1.27935.81118l28.67233-16.08336-.58936,16.00057-27.13738,12.82a10.15042,10.15042,0,0,1-11.63139,1.61428A8.34216,8.34216,0,0,1,382.77632,566.82181Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M406.35053,557.3917l.2755-.17406c27.73394-17.52829,56.40359-35.64765,87.2197-56.41349l.20185-.13613.21621.16792c5.46363,4.24233,8.33439,12.34854,6.67808,18.85539-1.5324,6.02009-7.20243,10.64869-13.80215,11.27624L450.049,550.84631c-11.90943,7.05521-24.23685,14.35751-36.42636,21.46865l-.34555.20162-.19828-.42571c-2.32974-5.0055-4.73707-10.17674-6.57422-14.34943Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M986,784.75H214a1,1,0,0,1,0-2H986a1,1,0,0,1,0,2Z" transform="translate(-213 -115.25)" fill="#cacaca"/></svg>`;
diff --git a/apps/mobile/src/components/walkthroughs/walkthroughs.tsx b/apps/mobile/src/components/walkthroughs/walkthroughs.tsx
index 1d99481d9..199dfe9df 100644
--- a/apps/mobile/src/components/walkthroughs/walkthroughs.tsx
+++ b/apps/mobile/src/components/walkthroughs/walkthroughs.tsx
@@ -8,7 +8,7 @@ import { getElevation } from '../../utils';
import { eOpenAddNotebookDialog } from '../../utils/events';
import { SIZE } from '../../utils/size';
import useRotator from '../../utils/hooks/use-rotator';
-import { AccentColorPicker } from '../../views/Settings/appearance';
+import { AccentColorPicker } from '../../screens/settings/appearance';
import { Button } from '../ui/button';
import { SvgView } from '../ui/svg';
import { PinItem } from '../side-menu/pinned-section';
diff --git a/apps/mobile/src/navigation/index.js b/apps/mobile/src/navigation/index.js
new file mode 100644
index 000000000..09c277297
--- /dev/null
+++ b/apps/mobile/src/navigation/index.js
@@ -0,0 +1,17 @@
+import React from 'react';
+import { TabsHolder } from './tabs-holder';
+import DialogProvider from '../components/dialog-provider';
+import { Toast } from '../components/toast';
+
+export const ApplicationHolder = React.memo(
+ () => {
+ return (
+ <>
+ <TabsHolder />
+ <Toast />
+ <DialogProvider />
+ </>
+ );
+ },
+ () => true
+);
diff --git a/apps/mobile/src/navigation/NavigatorStack.js b/apps/mobile/src/navigation/navigationstack.js
similarity index 85%
rename from apps/mobile/src/navigation/NavigatorStack.js
rename to apps/mobile/src/navigation/navigationstack.js
index a105e7ba5..76a1c6a73 100644
--- a/apps/mobile/src/navigation/NavigatorStack.js
+++ b/apps/mobile/src/navigation/navigationstack.js
@@ -10,18 +10,18 @@ import { history } from '../utils';
import { hideAllTooltips } from '../utils/hooks/use-tooltip';
import { MMKV } from '../utils/database/mmkv';
import { rootNavigatorRef } from '../utils/global-refs';
-import Favorites from '../views/Favorites';
-import Folders from '../views/Folders';
-import Home from '../views/Home';
-import Notebook from '../views/Notebook';
-import Notes from '../views/Notes';
-import { Search } from '../views/Search';
-import Settings from '../views/Settings';
-import Tags from '../views/Tags';
-import Trash from '../views/Trash';
+import Favorites from '../screens/favorites';
+import Notebooks from '../screens/notebooks';
+import Home from '../screens/home';
+import Notebook from '../screens/notebook';
+import Notes from '../screens/notes';
+import { Search } from '../screens/search';
+import Settings from '../screens/settings';
+import Tags from '../screens/tags';
+import Trash from '../screens/trash';
const Stack = createNativeStackNavigator();
-export const NavigatorStack = React.memo(
+export const NavigationStack = React.memo(
() => {
const [state, dispatch] = useTracked();
const { colors } = state;
@@ -78,7 +78,7 @@ export const NavigatorStack = React.memo(
}}
>
<Stack.Screen name="Notes" component={Home} />
- <Stack.Screen name="Notebooks" component={Folders} />
+ <Stack.Screen name="Notebooks" component={Notebooks} />
<Stack.Screen name="Favorites" component={Favorites} />
<Stack.Screen name="Trash" component={Trash} />
<Stack.Screen name="NotesPage" component={Notes} />
diff --git a/apps/mobile/src/navigation/RootView.js b/apps/mobile/src/navigation/tabsholder.js
similarity index 94%
rename from apps/mobile/src/navigation/RootView.js
rename to apps/mobile/src/navigation/tabsholder.js
index ed51d458d..6ec1edebe 100644
--- a/apps/mobile/src/navigation/RootView.js
+++ b/apps/mobile/src/navigation/tabsholder.js
@@ -5,12 +5,13 @@ import { StatusBar } from 'react-native-bars';
import Animated, { useValue } from 'react-native-reanimated';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { notesnook } from '../../e2e/test.ids';
-import Tabs from '../components/tabs';
-import DialogProvider from '../components/dialog-provider';
import { SideMenu } from '../components/side-menu';
-import { Toast } from '../components/toast';
+import Tabs from '../components/tabs';
import { useTracked } from '../provider';
import { useEditorStore, useSettingStore } from '../provider/stores';
+import { EditorWrapper } from '../screens/editor/EditorWrapper';
+import { checkStatus, EditorWebView, getNote } from '../screens/editor/Functions';
+import tiny from '../screens/editor/tiny/tiny';
import { DDS } from '../services/DeviceDetection';
import { eSendEvent, eSubscribeEvent, eUnSubscribeEvent } from '../services/EventManager';
import { editing, setWidthHeight } from '../utils';
@@ -21,13 +22,10 @@ import {
eOnLoadNote,
eOpenFullscreenEditor
} from '../utils/events';
-import { hideAllTooltips } from '../utils/hooks/use-tooltip';
import { editorRef, tabBarRef } from '../utils/global-refs';
+import { hideAllTooltips } from '../utils/hooks/use-tooltip';
import { sleep } from '../utils/time';
-import { EditorWrapper } from '../views/Editor/EditorWrapper';
-import { checkStatus, EditorWebView, getNote } from '../views/Editor/Functions';
-import tiny from '../views/Editor/tiny/tiny';
-import { NavigatorStack } from './NavigatorStack';
+import { NavigationStack } from './navigation-stack';
let layoutTimer = null;
@@ -70,20 +68,7 @@ const onChangeTab = async obj => {
}
};
-export const RootView = React.memo(
- () => {
- return (
- <>
- <NativeStack />
- <Toast />
- <DialogProvider />
- </>
- );
- },
- () => true
-);
-
-const NativeStack = React.memo(
+export const TabsHolder = React.memo(
() => {
const [state] = useTracked();
const { colors } = state;
@@ -333,7 +318,7 @@ const NativeStack = React.memo(
/>
) : null}
- <NavigatorStack />
+ <NavigationStack />
</View>,
<EditorWrapper key="3" width={widths} dimensions={dimensions} />
];
diff --git a/apps/mobile/src/provider/stores.ts b/apps/mobile/src/provider/stores.ts
index 783d44978..220eb11a9 100644
--- a/apps/mobile/src/provider/stores.ts
+++ b/apps/mobile/src/provider/stores.ts
@@ -10,9 +10,9 @@ import { SUBSCRIPTION_STATUS } from '../utils/constants';
import { db } from '../utils/database';
import { MMKV } from '../utils/database/mmkv';
import layoutmanager from '../utils/layout-manager';
-import { EditorWebView } from '../views/Editor/Functions';
-import tiny from '../views/Editor/tiny/tiny';
-import { endSearch } from '../views/Editor/tiny/toolbar/commands';
+import { EditorWebView } from '../screens/editor/Functions';
+import tiny from '../screens/editor/tiny/tiny';
+import { endSearch } from '../screens/editor/tiny/toolbar/commands';
import {
Announcement,
EditorStore,
diff --git a/apps/mobile/src/views/Editor/EditorHeader.js b/apps/mobile/src/screens/editor/EditorHeader.js
similarity index 100%
rename from apps/mobile/src/views/Editor/EditorHeader.js
rename to apps/mobile/src/screens/editor/EditorHeader.js
diff --git a/apps/mobile/src/views/Editor/EditorOverlay.js b/apps/mobile/src/screens/editor/EditorOverlay.js
similarity index 100%
rename from apps/mobile/src/views/Editor/EditorOverlay.js
rename to apps/mobile/src/screens/editor/EditorOverlay.js
diff --git a/apps/mobile/src/views/Editor/EditorSettings.js b/apps/mobile/src/screens/editor/EditorSettings.js
similarity index 100%
rename from apps/mobile/src/views/Editor/EditorSettings.js
rename to apps/mobile/src/screens/editor/EditorSettings.js
diff --git a/apps/mobile/src/views/Editor/EditorTitle.js b/apps/mobile/src/screens/editor/EditorTitle.js
similarity index 100%
rename from apps/mobile/src/views/Editor/EditorTitle.js
rename to apps/mobile/src/screens/editor/EditorTitle.js
diff --git a/apps/mobile/src/views/Editor/EditorWrapper.js b/apps/mobile/src/screens/editor/EditorWrapper.js
similarity index 100%
rename from apps/mobile/src/views/Editor/EditorWrapper.js
rename to apps/mobile/src/screens/editor/EditorWrapper.js
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/screens/editor/Functions.js
similarity index 100%
rename from apps/mobile/src/views/Editor/Functions.js
rename to apps/mobile/src/screens/editor/Functions.js
diff --git a/apps/mobile/src/views/Editor/HistoryComponent.js b/apps/mobile/src/screens/editor/HistoryComponent.js
similarity index 100%
rename from apps/mobile/src/views/Editor/HistoryComponent.js
rename to apps/mobile/src/screens/editor/HistoryComponent.js
diff --git a/apps/mobile/src/views/Editor/ProgressCircle.js b/apps/mobile/src/screens/editor/ProgressCircle.js
similarity index 100%
rename from apps/mobile/src/views/Editor/ProgressCircle.js
rename to apps/mobile/src/screens/editor/ProgressCircle.js
diff --git a/apps/mobile/src/views/Editor/TableCellProperties.js b/apps/mobile/src/screens/editor/TableCellProperties.js
similarity index 100%
rename from apps/mobile/src/views/Editor/TableCellProperties.js
rename to apps/mobile/src/screens/editor/TableCellProperties.js
diff --git a/apps/mobile/src/views/Editor/TableRowProperties.js b/apps/mobile/src/screens/editor/TableRowProperties.js
similarity index 100%
rename from apps/mobile/src/views/Editor/TableRowProperties.js
rename to apps/mobile/src/screens/editor/TableRowProperties.js
diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/screens/editor/index.js
similarity index 100%
rename from apps/mobile/src/views/Editor/index.js
rename to apps/mobile/src/screens/editor/index.js
diff --git a/apps/mobile/src/views/Editor/tiny/tiny.js b/apps/mobile/src/screens/editor/tiny/tiny.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/tiny.js
rename to apps/mobile/src/screens/editor/tiny/tiny.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/colorgroup.js b/apps/mobile/src/screens/editor/tiny/toolbar/colorgroup.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/colorgroup.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/colorgroup.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/coloritem.js b/apps/mobile/src/screens/editor/tiny/toolbar/coloritem.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/coloritem.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/coloritem.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/commands.js b/apps/mobile/src/screens/editor/tiny/toolbar/commands.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/commands.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/commands.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/config.js b/apps/mobile/src/screens/editor/tiny/toolbar/config.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/config.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/config.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/constants.js b/apps/mobile/src/screens/editor/tiny/toolbar/constants.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/constants.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/constants.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/group.js b/apps/mobile/src/screens/editor/tiny/toolbar/group.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/group.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/group.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/index.js b/apps/mobile/src/screens/editor/tiny/toolbar/index.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/index.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/index.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/item.js b/apps/mobile/src/screens/editor/tiny/toolbar/item.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/item.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/item.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/itempin.js b/apps/mobile/src/screens/editor/tiny/toolbar/itempin.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/itempin.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/itempin.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/linkinput.js b/apps/mobile/src/screens/editor/tiny/toolbar/linkinput.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/linkinput.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/linkinput.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/linkpreview.js b/apps/mobile/src/screens/editor/tiny/toolbar/linkpreview.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/linkpreview.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/linkpreview.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/listformat.js b/apps/mobile/src/screens/editor/tiny/toolbar/listformat.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/listformat.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/listformat.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/picker.js b/apps/mobile/src/screens/editor/tiny/toolbar/picker.js
similarity index 98%
rename from apps/mobile/src/views/Editor/tiny/toolbar/picker.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/picker.js
index dc984fc60..8155834e5 100644
--- a/apps/mobile/src/views/Editor/tiny/toolbar/picker.js
+++ b/apps/mobile/src/screens/editor/tiny/toolbar/picker.js
@@ -4,7 +4,7 @@ import DocumentPicker from 'react-native-document-picker';
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
import Sodium from 'react-native-sodium';
import RNFetchBlob from 'rn-fetch-blob';
-import { AttachmentItem } from '../../../../components/AttachmentDialog/attachment-item';
+import { AttachmentItem } from '../../../../components/attachments/attachment-item';
import { eSendEvent, presentSheet, ToastEvent } from '../../../../services/EventManager';
import PremiumService from '../../../../services/PremiumService';
import { editing } from '../../../../utils';
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/searchreplace.js b/apps/mobile/src/screens/editor/tiny/toolbar/searchreplace.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/searchreplace.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/searchreplace.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/table.js b/apps/mobile/src/screens/editor/tiny/toolbar/table.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/table.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/table.js
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/tooltip.js b/apps/mobile/src/screens/editor/tiny/toolbar/tooltip.js
similarity index 100%
rename from apps/mobile/src/views/Editor/tiny/toolbar/tooltip.js
rename to apps/mobile/src/screens/editor/tiny/toolbar/tooltip.js
diff --git a/apps/mobile/src/views/Favorites/index.js b/apps/mobile/src/screens/favorites/index.js
similarity index 100%
rename from apps/mobile/src/views/Favorites/index.js
rename to apps/mobile/src/screens/favorites/index.js
diff --git a/apps/mobile/src/views/Home/index.js b/apps/mobile/src/screens/home/index.js
similarity index 98%
rename from apps/mobile/src/views/Home/index.js
rename to apps/mobile/src/screens/home/index.js
index 82467363d..cb4f53487 100755
--- a/apps/mobile/src/views/Home/index.js
+++ b/apps/mobile/src/screens/home/index.js
@@ -13,7 +13,7 @@ import { editing, InteractionManager } from '../../utils';
import { db } from '../../utils/database';
import { eOnLoadNote } from '../../utils/events';
import { tabBarRef } from '../../utils/global-refs';
-import { getNote } from '../Editor/Functions';
+import { getNote } from '../editor/Functions';
export const Home = ({ navigation }) => {
const notes = useNoteStore(state => state.notes);
diff --git a/apps/mobile/src/views/Notebook/index.js b/apps/mobile/src/screens/notebook/index.js
similarity index 100%
rename from apps/mobile/src/views/Notebook/index.js
rename to apps/mobile/src/screens/notebook/index.js
diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/screens/notebooks/index.js
similarity index 97%
rename from apps/mobile/src/views/Folders/index.js
rename to apps/mobile/src/screens/notebooks/index.js
index 5601eb4ea..afa4982ef 100644
--- a/apps/mobile/src/views/Folders/index.js
+++ b/apps/mobile/src/screens/notebooks/index.js
@@ -11,7 +11,7 @@ import Navigation from '../../services/Navigation';
import SearchService from '../../services/SearchService';
import { InteractionManager } from '../../utils';
-export const Folders = ({ navigation }) => {
+export const Notebooks = ({ navigation }) => {
const notebooks = useNotebookStore(state => state.notebooks);
const setNotebooks = useNotebookStore(state => state.setNotebooks);
let ranAfterInteractions = false;
@@ -103,4 +103,4 @@ export const Folders = ({ navigation }) => {
);
};
-export default Folders;
+export default Notebooks;
diff --git a/apps/mobile/src/views/Notes/index.js b/apps/mobile/src/screens/notes/index.js
similarity index 98%
rename from apps/mobile/src/views/Notes/index.js
rename to apps/mobile/src/screens/notes/index.js
index b067a4829..ff76984ba 100644
--- a/apps/mobile/src/views/Notes/index.js
+++ b/apps/mobile/src/screens/notes/index.js
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import { FloatingButton } from '../../components/container/floating-button';
import { ContainerHeader } from '../../components/container/containerheader';
import { Header } from '../../components/header';
-import { MoveNotes } from '../../components/MoveNoteDialog/movenote';
+import { MoveNotes } from '../../components/sheets/move-notes/movenote';
import SelectionHeader from '../../components/selection-header';
import List from '../../components/list';
import { useTracked } from '../../provider';
@@ -17,7 +17,7 @@ import { db } from '../../utils/database';
import { eOnLoadNote, eOpenAddTopicDialog, refreshNotesPage } from '../../utils/events';
import { openLinkInBrowser } from '../../utils/functions';
import { tabBarRef } from '../../utils/global-refs';
-import { getNote } from '../Editor/Functions';
+import { getNote } from '../editor/Functions';
const getNotes = params => {
if (!params) return [];
diff --git a/apps/mobile/src/views/Search/index.js b/apps/mobile/src/screens/search/index.js
similarity index 100%
rename from apps/mobile/src/views/Search/index.js
rename to apps/mobile/src/screens/search/index.js
diff --git a/apps/mobile/src/views/Search/searchbar.js b/apps/mobile/src/screens/search/searchbar.js
similarity index 100%
rename from apps/mobile/src/views/Search/searchbar.js
rename to apps/mobile/src/screens/search/searchbar.js
diff --git a/apps/mobile/src/views/Settings/appearance.js b/apps/mobile/src/screens/settings/appearance.js
similarity index 100%
rename from apps/mobile/src/views/Settings/appearance.js
rename to apps/mobile/src/screens/settings/appearance.js
diff --git a/apps/mobile/src/views/Settings/applock.js b/apps/mobile/src/screens/settings/applock.js
similarity index 100%
rename from apps/mobile/src/views/Settings/applock.js
rename to apps/mobile/src/screens/settings/applock.js
diff --git a/apps/mobile/src/views/Settings/backuprestore.js b/apps/mobile/src/screens/settings/backuprestore.js
similarity index 100%
rename from apps/mobile/src/views/Settings/backuprestore.js
rename to apps/mobile/src/screens/settings/backuprestore.js
diff --git a/apps/mobile/src/views/Settings/button.js b/apps/mobile/src/screens/settings/button.js
similarity index 100%
rename from apps/mobile/src/views/Settings/button.js
rename to apps/mobile/src/screens/settings/button.js
diff --git a/apps/mobile/src/views/Settings/developeroptions.js b/apps/mobile/src/screens/settings/developeroptions.js
similarity index 100%
rename from apps/mobile/src/views/Settings/developeroptions.js
rename to apps/mobile/src/screens/settings/developeroptions.js
diff --git a/apps/mobile/src/views/Settings/functions.js b/apps/mobile/src/screens/settings/functions.js
similarity index 100%
rename from apps/mobile/src/views/Settings/functions.js
rename to apps/mobile/src/screens/settings/functions.js
diff --git a/apps/mobile/src/views/Settings/general.js b/apps/mobile/src/screens/settings/general.js
similarity index 100%
rename from apps/mobile/src/views/Settings/general.js
rename to apps/mobile/src/screens/settings/general.js
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/screens/settings/index.js
similarity index 99%
rename from apps/mobile/src/views/Settings/index.js
rename to apps/mobile/src/screens/settings/index.js
index 03ac405b7..011075329 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/screens/settings/index.js
@@ -3,7 +3,7 @@ import { Linking, Platform, ScrollView, View } from 'react-native';
import { APP_VERSION } from '../../../version';
import { Button as MButton } from '../../components/ui/button/index';
import { ContainerHeader } from '../../components/container/containerheader';
-import { Issue } from '../../components/Github/issue';
+import { Issue } from '../../components/sheets/github/issue';
import { Header as TopHeader } from '../../components/header/index';
import Seperator from '../../components/ui/seperator';
import Paragraph from '../../components/ui/typography/paragraph';
diff --git a/apps/mobile/src/views/Settings/logout.js b/apps/mobile/src/screens/settings/logout.js
similarity index 100%
rename from apps/mobile/src/views/Settings/logout.js
rename to apps/mobile/src/screens/settings/logout.js
diff --git a/apps/mobile/src/views/Settings/privacy.js b/apps/mobile/src/screens/settings/privacy.js
similarity index 100%
rename from apps/mobile/src/views/Settings/privacy.js
rename to apps/mobile/src/screens/settings/privacy.js
diff --git a/apps/mobile/src/views/Settings/sectionheader.js b/apps/mobile/src/screens/settings/sectionheader.js
similarity index 100%
rename from apps/mobile/src/views/Settings/sectionheader.js
rename to apps/mobile/src/screens/settings/sectionheader.js
diff --git a/apps/mobile/src/views/Settings/usersection.js b/apps/mobile/src/screens/settings/usersection.js
similarity index 100%
rename from apps/mobile/src/views/Settings/usersection.js
rename to apps/mobile/src/screens/settings/usersection.js
diff --git a/apps/mobile/src/views/Tags/index.js b/apps/mobile/src/screens/tags/index.js
similarity index 100%
rename from apps/mobile/src/views/Tags/index.js
rename to apps/mobile/src/screens/tags/index.js
diff --git a/apps/mobile/src/views/Trash/index.js b/apps/mobile/src/screens/trash/index.js
similarity index 100%
rename from apps/mobile/src/views/Trash/index.js
rename to apps/mobile/src/screens/trash/index.js
diff --git a/apps/mobile/src/services/Message.js b/apps/mobile/src/services/Message.js
index 8289a8a11..f2d89ae08 100644
--- a/apps/mobile/src/services/Message.js
+++ b/apps/mobile/src/services/Message.js
@@ -2,7 +2,7 @@ import { useMessageStore } from '../provider/stores';
import { eOpenLoginDialog, eOpenRateDialog, eOpenRecoveryKeyDialog } from '../utils/events';
import { eSendEvent } from './EventManager';
import PremiumService from './PremiumService';
-import { verifyUser } from '../views/Settings/functions';
+import { verifyUser } from '../screens/settings/functions';
import { MMKV } from '../utils/database/mmkv';
import { Platform } from 'react-native';
import umami from '../utils/analytics';
diff --git a/apps/mobile/src/services/Sync.js b/apps/mobile/src/services/Sync.js
index 60c4c4051..23430d5ad 100644
--- a/apps/mobile/src/services/Sync.js
+++ b/apps/mobile/src/services/Sync.js
@@ -3,7 +3,7 @@ import NetInfo from '@react-native-community/netinfo';
import { initialize, useUserStore } from '../provider/stores';
import { doInBackground } from '../utils';
import { db } from '../utils/database';
-import { getNote, updateNoteInEditor } from '../views/Editor/Functions';
+import { getNote, updateNoteInEditor } from '../screens/editor/Functions';
import { ToastEvent } from './EventManager';
let retryCount = 0;
diff --git a/apps/mobile/src/utils/filesystem/download.js b/apps/mobile/src/utils/filesystem/download.js
index e9b59519b..15bfa1730 100644
--- a/apps/mobile/src/utils/filesystem/download.js
+++ b/apps/mobile/src/utils/filesystem/download.js
@@ -3,7 +3,7 @@ import { Platform } from 'react-native';
import * as ScopedStorage from 'react-native-scoped-storage';
import Sodium from 'react-native-sodium';
import RNFetchBlob from 'rn-fetch-blob';
-import { ShareComponent } from '../../components/ExportDialog/share';
+import { ShareComponent } from '../../components/sheets/export-notes/share';
import { useAttachmentStore } from '../../provider/stores';
import { presentSheet, ToastEvent } from '../../services/EventManager';
import { db } from '../database';
diff --git a/apps/mobile/src/utils/hooks/useActions.js b/apps/mobile/src/utils/hooks/useActions.js
index 5d052bf3d..0d1edd764 100644
--- a/apps/mobile/src/utils/hooks/useActions.js
+++ b/apps/mobile/src/utils/hooks/useActions.js
@@ -46,10 +46,10 @@ import { deleteItems } from '../functions';
import { MMKV } from '../database/mmkv';
import { sleep } from '../time';
import { presentDialog } from '../../components/dialog/functions';
-import { MoveNotes } from '../../components/MoveNoteDialog/movenote';
-import NoteHistory from '../../components/NoteHistory';
-import tiny from '../../views/Editor/tiny/tiny.js';
-import { EditorWebView } from '../../views/Editor/Functions';
+import { MoveNotes } from '../../components/sheets/move-notes/movenote';
+import NoteHistory from '../../components/note-history';
+import tiny from '../../screens/editor/tiny/tiny.js';
+import { EditorWebView } from '../../screens/editor/Functions';
export const useActions = ({ close = () => {}, item }) => {
const [state, dispatch] = useTracked();
diff --git a/apps/mobile/src/utils/hooks/useAppEvents.js b/apps/mobile/src/utils/hooks/useAppEvents.js
index b300f89c3..6af29c506 100644
--- a/apps/mobile/src/utils/hooks/useAppEvents.js
+++ b/apps/mobile/src/utils/hooks/useAppEvents.js
@@ -44,8 +44,8 @@ import {
getNote,
getWebviewInit,
updateNoteInEditor
-} from '../../views/Editor/Functions';
-import tiny from '../../views/Editor/tiny/tiny';
+} from '../../screens/editor/Functions';
+import tiny from '../../screens/editor/tiny/tiny';
import { updateStatusBarColor } from '../color-scheme';
import { db } from '../database';
import { eClearEditor, eCloseProgressDialog, eOpenLoginDialog, refreshNotesPage } from '../events';
diff --git a/apps/mobile/src/utils/hooks/useEditorTags.ts b/apps/mobile/src/utils/hooks/useEditorTags.ts
index 5cc10922a..a23a289df 100644
--- a/apps/mobile/src/utils/hooks/useEditorTags.ts
+++ b/apps/mobile/src/utils/hooks/useEditorTags.ts
@@ -2,8 +2,8 @@ import { useEffect, useState } from 'react';
import { useEditorStore, useTagStore } from '../../provider/stores';
import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
import { db } from '../database';
-import { EditorWebView } from '../../views/Editor/Functions';
-import tiny from '../../views/Editor/tiny/tiny';
+import { EditorWebView } from '../../screens/editor/Functions';
+import tiny from '../../screens/editor/tiny/tiny';
/**
* A hook that injects/removes tags from tags bar in editor