A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: prepare release v3.3.0
Ammar Ahmed02e37c6ed46a
diff --git a/apps/mobile/app/common/database/index.ts b/apps/mobile/app/common/database/index.tsindex 3d3a9959a..b5a59ec11 100644--- a/apps/mobile/app/common/database/index.ts+++ b/apps/mobile/app/common/database/index.ts@@ -33,34 +33,35 @@ import { getDatabaseKey } from "./encryption";import "./logger";import { RNSqliteDriver } from "./sqlite.kysely";import { Storage } from "./storage";+import SettingsService from "../../services/settings";export async function setupDatabase(password?: string) {const key = await getDatabaseKey(password);if (!key) throw new Error(strings.databaseSetupFailed());- const base = `http://192.168.100.88`;+ // const base = `http://192.168.100.88`;++ // database.host({+ // API_HOST: `${base}:5264`,+ // AUTH_HOST: `${base}:8264`,+ // SSE_HOST: `${base}:7264`,+ // ISSUES_HOST: `${base}:2624`,+ // SUBSCRIPTIONS_HOST: `${base}:9264`,+ // MONOGRAPH_HOST: `${base}:6264`,+ // NOTESNOOK_HOST: `${base}:8788`+ // });database.host({- API_HOST: `${base}:5264`,- AUTH_HOST: `${base}:8264`,- SSE_HOST: `${base}:7264`,- ISSUES_HOST: `${base}:2624`,- SUBSCRIPTIONS_HOST: `${base}:9264`,- MONOGRAPH_HOST: `${base}:6264`,- NOTESNOOK_HOST: `${base}:8788`+ API_HOST: "https://api.notesnook.com",+ AUTH_HOST: "https://auth.streetwriters.co",+ SSE_HOST: "https://events.streetwriters.co",+ SUBSCRIPTIONS_HOST: "https://subscriptions.streetwriters.co",+ ISSUES_HOST: "https://issues.streetwriters.co",+ MONOGRAPH_HOST: "https://monogr.ph",+ NOTESNOOK_HOST: "https://notesnook.com",+ ...(SettingsService.getProperty("serverUrls") || {})});- // database.host( {- // API_HOST: "https://api.notesnook.com",- // AUTH_HOST: "https://auth.streetwriters.co",- // SSE_HOST: "https://events.streetwriters.co",- // SUBSCRIPTIONS_HOST: "https://subscriptions.streetwriters.co",- // ISSUES_HOST: "https://issues.streetwriters.co",- // MONOGRAPH_HOST: "https://monogr.ph",- // NOTESNOOK_HOST: "https://notesnook.com",- // ...(SettingsService.getProperty("serverUrls") || {})- // });-database.setup({storage: Storage,eventsource: (Platform.OS === "ios"diff --git a/apps/mobile/app/components/list-items/headers/header.tsx b/apps/mobile/app/components/list-items/headers/header.tsxindex 3811934ad..b929919c9 100644--- a/apps/mobile/app/components/list-items/headers/header.tsx+++ b/apps/mobile/app/components/list-items/headers/header.tsx@@ -44,9 +44,8 @@ export const Header = React.memo(}: ListHeaderProps) => {const { colors } = useThemeColors();const announcements = useMessageStore((state) => state.announcements);- const selectionMode = useSelectionStore((state) => state.selectionMode);- return selectionMode ? null : (+ return (<>{announcements.length !== 0 && !noAnnouncement ? (<Announcement color={color || colors.primary.accent} />diff --git a/apps/mobile/app/components/properties/items.tsx b/apps/mobile/app/components/properties/items.tsxindex 13c30cdbb..3a9def97e 100644--- a/apps/mobile/app/components/properties/items.tsx+++ b/apps/mobile/app/components/properties/items.tsx@@ -371,8 +371,7 @@ export const Items = ({style={{flexDirection: "row",paddingHorizontal: DefaultAppStyles.GAP,- gap: 5,- width: width+ gap: 5}}>{item.map(renderTopBarItem)}diff --git a/apps/mobile/app/components/selection-header/index.tsx b/apps/mobile/app/components/selection-header/index.tsxindex 493b94131..4ae8364b4 100644--- a/apps/mobile/app/components/selection-header/index.tsx+++ b/apps/mobile/app/components/selection-header/index.tsx@@ -87,7 +87,7 @@ export const SelectionHeader = React.memo(const restoreItem = async () => {if (!selectedItemsList.length) return;- if ((await db.trash.restore(...selectedItemsList)) === false) return;+ await db.trash.restore(...selectedItemsList);Navigation.queueRoutesForUpdate();clearSelection();diff --git a/apps/mobile/app/components/ui/sheet/index.js b/apps/mobile/app/components/ui/sheet/index.jsindex 1f8f89f30..6401c443c 100644--- a/apps/mobile/app/components/ui/sheet/index.js+++ b/apps/mobile/app/components/ui/sheet/index.js@@ -63,7 +63,6 @@ const SheetWrapper = ({let width = dimensions.width > 600 ? 600 : 500;const isGestureNavigationEnabled =NotesnookModule.isGestureNavigationEnabled();-const style = React.useMemo(() => {return {width: largeTablet || smallTablet ? width : "100%",@@ -78,8 +77,10 @@ const SheetWrapper = ({...getContainerBorder(colors.primary.border, 0.5),borderBottomWidth: 0,paddingBottom:- isGestureNavigationEnabled && Platform.OS === "android"- ? insets.bottom+ Platform.OS === "android"+ ? isGestureNavigationEnabled+ ? insets.bottom+ : 30: 0};}, [diff --git a/apps/mobile/app/screens/archive/index.tsx b/apps/mobile/app/screens/archive/index.tsxindex 60c3f6ca4..6ed7f97ec 100644--- a/apps/mobile/app/screens/archive/index.tsx+++ b/apps/mobile/app/screens/archive/index.tsx@@ -47,7 +47,6 @@ export const Archive = ({ navigation, route }: NavigationProps<"Archive">) => {return (<>- <SelectionHeader id={route.name} items={archive} type="note" /><HeaderrenderedInRoute={route.name}title={strings.routes[route.name]()}@@ -81,6 +80,8 @@ export const Archive = ({ navigation, route }: NavigationProps<"Archive">) => {headerTitle={strings.routes.Archive()}/></DelayLayout>++ <SelectionHeader id={route.name} items={archive} type="note" /></>);};diff --git a/apps/mobile/app/screens/favorites/index.tsx b/apps/mobile/app/screens/favorites/index.tsxindex 94f2b7876..522051f5e 100644--- a/apps/mobile/app/screens/favorites/index.tsx+++ b/apps/mobile/app/screens/favorites/index.tsx@@ -50,7 +50,6 @@ export const Favorites = ({return (<>- <SelectionHeader id={route.name} items={favorites} type="note" /><HeaderrenderedInRoute={route.name}title={strings.routes[route.name]()}@@ -84,6 +83,8 @@ export const Favorites = ({headerTitle={strings.routes.Favorites()}/></DelayLayout>++ <SelectionHeader id={route.name} items={favorites} type="note" /></>);};diff --git a/apps/mobile/app/screens/home/index.tsx b/apps/mobile/app/screens/home/index.tsxindex 16ec0006d..a03bee164 100755--- a/apps/mobile/app/screens/home/index.tsx+++ b/apps/mobile/app/screens/home/index.tsx@@ -49,7 +49,6 @@ export const Home = ({ navigation, route }: NavigationProps<"Notes">) => {return (<>- <SelectionHeader id={route.name} items={notes} type="note" /><HeaderrenderedInRoute={route.name}title={strings.routes[route.name]()}@@ -86,6 +85,7 @@ export const Home = ({ navigation, route }: NavigationProps<"Notes">) => {<FloatingButton onPress={openEditor} alwaysVisible />)}</DelayLayout>+ <SelectionHeader id={route.name} items={notes} type="note" /></>);};diff --git a/apps/mobile/app/screens/link-notebooks/index.tsx b/apps/mobile/app/screens/link-notebooks/index.tsxindex 8af0fb4b1..710dfa05f 100644--- a/apps/mobile/app/screens/link-notebooks/index.tsx+++ b/apps/mobile/app/screens/link-notebooks/index.tsx@@ -300,7 +300,12 @@ const LinkNotebooks = (props: NavigationProps<"LinkNotebooks">) => {/>{hasSelection ? (- <FloatingButton icon="check" alwaysVisible onPress={() => onSave()} />+ <FloatingButton+ testID="floating-save-button"+ icon="check"+ alwaysVisible+ onPress={() => onSave()}+ />) : null}</SafeAreaView>);diff --git a/apps/mobile/app/screens/notebook/index.tsx b/apps/mobile/app/screens/notebook/index.tsxindex 2fa57383a..d44d97f28 100644--- a/apps/mobile/app/screens/notebook/index.tsx+++ b/apps/mobile/app/screens/notebook/index.tsx@@ -150,12 +150,6 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {return (<>- <SelectionHeader- id={route.params?.item?.id}- items={notes}- type="note"- renderedInRoute="Notebook"- /><HeaderrenderedInRoute={route.name}title={params.current.item?.title}@@ -241,6 +235,12 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {}}/></View>+ <SelectionHeader+ id={route.params?.item?.id}+ items={notes}+ type="note"+ renderedInRoute="Notebook"+ /></>);};diff --git a/apps/mobile/app/screens/notes/index.tsx b/apps/mobile/app/screens/notes/index.tsxindex 1bcc960e7..4639cfad9 100644--- a/apps/mobile/app/screens/notes/index.tsx+++ b/apps/mobile/app/screens/notes/index.tsx@@ -187,12 +187,6 @@ const NotesPage = ({return (<>- <SelectionHeader- id={route.params?.item?.id || route.name}- items={notes}- type="note"- renderedInRoute={route.name}- /><HeaderrenderedInRoute={route.name}title={@@ -243,6 +237,12 @@ const NotesPage = ({/>) : null}</DelayLayout>+ <SelectionHeader+ id={route.params?.item?.id || route.name}+ items={notes}+ type="note"+ renderedInRoute={route.name}+ /></>);};diff --git a/apps/mobile/app/screens/reminders/index.tsx b/apps/mobile/app/screens/reminders/index.tsxindex 6f7451c0c..fd4201ac4 100644--- a/apps/mobile/app/screens/reminders/index.tsx+++ b/apps/mobile/app/screens/reminders/index.tsx@@ -55,7 +55,6 @@ export const Reminders = ({return (<>- <SelectionHeader id={route.name} items={reminders} type="reminder" /><HeaderrenderedInRoute={route.name}title={strings.routes[route.name]()}@@ -138,6 +137,8 @@ export const Reminders = ({alwaysVisible/></DelayLayout>++ <SelectionHeader id={route.name} items={reminders} type="reminder" /></>);};diff --git a/apps/mobile/app/screens/search/index.tsx b/apps/mobile/app/screens/search/index.tsxindex b973c2531..906e4eb8b 100644--- a/apps/mobile/app/screens/search/index.tsx+++ b/apps/mobile/app/screens/search/index.tsx@@ -141,12 +141,6 @@ export const Search = ({ route, navigation }: NavigationProps<"Search">) => {return (<>- <SelectionHeader- id={route.name}- items={results}- type={route.params?.type}- renderedInRoute={route.name}- /><SearchBaronChangeText={(query) => {clearTimeout(timer.current);@@ -167,6 +161,12 @@ export const Search = ({ route, navigation }: NavigationProps<"Search">) => {loading: strings.searchingFor(currentQuery.current as string)}}/>+ <SelectionHeader+ id={route.name}+ items={results}+ type={route.params?.type}+ renderedInRoute={route.name}+ /></>);};diff --git a/apps/mobile/app/screens/trash/index.tsx b/apps/mobile/app/screens/trash/index.tsxindex 63d57d4a8..c060312f8 100644--- a/apps/mobile/app/screens/trash/index.tsx+++ b/apps/mobile/app/screens/trash/index.tsx@@ -79,12 +79,6 @@ export const Trash = ({ navigation, route }: NavigationProps<"Trash">) => {return (<>- <SelectionHeader- id={route.name}- items={trash}- type="trash"- renderedInRoute={route.name}- /><HeaderrenderedInRoute={route.name}title={route.name}@@ -117,6 +111,12 @@ export const Trash = ({ navigation, route }: NavigationProps<"Trash">) => {/>) : null}</DelayLayout>+ <SelectionHeader+ id={route.name}+ items={trash}+ type="trash"+ renderedInRoute={route.name}+ /></>);};diff --git a/apps/mobile/e2e/tests/index.e2e.ts b/apps/mobile/e2e/tests/index.e2e.tsindex 5e7a2fb79..cbee40835 100644--- a/apps/mobile/e2e/tests/index.e2e.ts+++ b/apps/mobile/e2e/tests/index.e2e.ts@@ -17,37 +17,33 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Tests } from "./utils";+import { TestBuilder } from "./utils";describe("APP LAUNCH AND NAVIGATION", () => {it("App should launch successfully & hide welcome screen", async () => {- await Tests.prepare();+ await TestBuilder.create().prepare().run();});it("Basic navigation should work", async () => {- await Tests.prepare();- await Tests.navigate("Favorites");- await Tests.navigate("Reminders");- await Tests.navigate("Monographs");- await Tests.navigate("Trash");- await Tests.openSideMenu();- await Tests.fromId("sidemenu-settings-icon").waitAndTap();- await Tests.fromText("Settings").waitAndTap();- await Tests.fromText("Settings").isVisible();- await device.pressBack();-- await Tests.fromId("tab-notebooks").tap();- await Tests.fromText("No notebooks").isVisible();- await Tests.fromId("tab-tags").tap();- await Tests.fromText("No tags").isVisible();- await Tests.fromId("tab-home").tap();-- await Tests.fromText("Notes").tap();- await Tests.fromText("Search in Notes").isVisible();-- // await Tests.navigate("Tags");- // await Tests.navigate("Settings");-- // await Tests.navigate("Notebooks");+ await TestBuilder.create()+ .prepare()+ .navigate("Favorites")+ .navigate("Reminders")+ .navigate("Monographs")+ .navigate("Trash")+ .openSideMenu()+ .waitAndTapById("sidemenu-settings-icon")+ .wait(500)+ .waitAndTapByText("Settings")+ .isVisibleByText("Settings")+ .pressBack(1)+ .tapById("tab-notebooks")+ .isVisibleByText("No notebooks")+ .tapById("tab-tags")+ .isVisibleByText("No tags")+ .tapById("tab-home")+ .tapByText("Notes")+ .isVisibleByText("Search in Notes")+ .run();});});diff --git a/apps/mobile/e2e/tests/note.e2e.ts b/apps/mobile/e2e/tests/note.e2e.tsindex a58a88012..a4ad34874 100644--- a/apps/mobile/e2e/tests/note.e2e.ts+++ b/apps/mobile/e2e/tests/note.e2e.ts@@ -37,6 +37,7 @@ describe("NOTE TESTS", () => {await Tests.prepare();await Tests.createNote();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromText("Created at").isVisible();});@@ -44,12 +45,16 @@ describe("NOTE TESTS", () => {await Tests.prepare();let note = await Tests.createNote();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromId("icon-favorite").waitAndTap();+ await device.pressBack();await Tests.fromId("icon-star").isVisible();await Tests.navigate("Favorites");await Tests.fromText(note.body).isVisible();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromId("icon-favorite").waitAndTap();+ await device.pressBack();await Tests.fromText(note.body).isNotVisible();await Tests.navigate("Notes");});@@ -58,15 +63,19 @@ describe("NOTE TESTS", () => {await Tests.prepare();await Tests.createNote();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromId("icon-pin").waitAndTap();+ await device.pressBack();await Tests.fromText("PINNED").isVisible();await Tests.fromId("icon-pinned").isVisible();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromId("icon-pin").waitAndTap();+ await device.pressBack();await Tests.fromText("icon-pinned").isNotVisible();});- it("Pin a note in notifications", async () => {+ it.skip("Pin a note in notifications", async () => {await Tests.prepare();await Tests.createNote();await Tests.fromId(notesnook.listitem.menu).waitAndTap();@@ -80,6 +89,7 @@ describe("NOTE TESTS", () => {await Tests.prepare();await Tests.createNote();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromId("icon-copy").isVisible();await Tests.fromId("icon-copy").waitAndTap();});@@ -88,6 +98,7 @@ describe("NOTE TESTS", () => {await Tests.prepare();let note = await Tests.createNote();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromText("Add color").waitAndTap();await Tests.fromId("color-title-input").element.typeText("Test color");await Tests.fromText("Add color").waitAndTap();@@ -100,13 +111,15 @@ describe("NOTE TESTS", () => {await Tests.fromText(note.body).isVisible();});- it.only("Delete & restore a note", async () => {+ it("Delete & restore a note", async () => {await Tests.prepare();await Tests.createNote();await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromId("icon-trash").waitAndTap();await Tests.navigate("Trash");await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await Tests.fromText("Restore").waitAndTap();await device.pressBack();await Tests.fromText(diff --git a/apps/mobile/e2e/tests/notebook.e2e.ts b/apps/mobile/e2e/tests/notebook.e2e.tsindex f29ccbc59..c6f20ee38 100644--- a/apps/mobile/e2e/tests/notebook.e2e.ts+++ b/apps/mobile/e2e/tests/notebook.e2e.ts@@ -27,7 +27,7 @@ describe("NOTEBOOKS", () => {await Tests.fromId("tab-notebooks").waitAndTap();await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", false);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").isVisible();});@@ -37,39 +37,26 @@ describe("NOTEBOOKS", () => {await Tests.fromId("tab-notebooks").waitAndTap();await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", true);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").isVisible();});- it("Create a notebook, move notes", async () => {- await Tests.prepare();- let note = await Tests.createNote();- await Tests.openSideMenu();- await Tests.fromId("tab-notebooks").waitAndTap();- await Tests.fromId("sidebar-add-button").waitAndTap();- await Tests.createNotebook("Notebook 1", true);- await Tests.fromId("listitem.select").waitAndTap();- await Tests.fromText("Move selected notes").waitAndTap();- await Tests.fromText("Notebook 1").waitAndTap();- await Tests.fromText(note.body).isVisible();- });-it("Add a sub notebook to a notebook", async () => {await Tests.prepare();await Tests.openSideMenu();await Tests.fromId("tab-notebooks").waitAndTap();await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", true);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").element.longPress();+ await Tests.sleep(500);await Tests.fromText("Add notebook").waitAndTap();await Tests.createNotebook("Sub notebook", true);- await device.pressBack();await Tests.sleep(500);await Tests.fromId("expand-notebook-0").waitAndTap();await Tests.fromText("Sub notebook").isVisible();await Tests.fromText("Sub notebook").element.longPress();-+ await Tests.sleep(500);await Tests.fromText("Move to trash").waitAndTap();await Tests.fromText("Delete").waitAndTap();await Tests.fromText("Sub notebook").isNotVisible();@@ -81,9 +68,9 @@ describe("NOTEBOOKS", () => {await Tests.fromId("tab-notebooks").waitAndTap();await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", true);- await device.pressBack();await Tests.sleep(500);await Tests.fromText("Notebook 1").element.longPress();+ await Tests.sleep(500);await Tests.fromText("Edit notebook").waitAndTap();await Tests.fromId(notesnook.ids.dialogs.notebook.inputs.title@@ -98,15 +85,14 @@ describe("NOTEBOOKS", () => {await Tests.openSideMenu();await Tests.fromId("tab-notebooks").waitAndTap();await Tests.fromId("sidebar-add-button").waitAndTap();-await Tests.createNotebook("Notebook 1", true);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").element.longPress();+ await Tests.sleep(500);await Tests.fromText("Add notebook").waitAndTap();await Tests.createNotebook("Sub notebook", true);- await device.pressBack();await Tests.sleep(500);await Tests.fromId("expand-notebook-0").waitAndTap();@@ -128,7 +114,7 @@ describe("NOTEBOOKS", () => {await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", true);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").waitAndTap();await Tests.createNote();@@ -142,12 +128,13 @@ describe("NOTEBOOKS", () => {await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", true);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").waitAndTap();await Tests.sleep(500);let note = await Tests.createNote();await Tests.fromText(note.body).element.longPress();+ await Tests.sleep(500);await Tests.fromId("select-minus").waitAndTap();await Tests.fromId(note.title).isNotVisible();@@ -161,7 +148,7 @@ describe("NOTEBOOKS", () => {await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", true);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromId("tab-home").waitAndTap();await Tests.fromText("Notes").waitAndTap();@@ -174,7 +161,7 @@ describe("NOTEBOOKS", () => {await Tests.fromId("icon-notebooks").waitAndTap();await Tests.fromText("Notebook 1").waitAndTap();- await Tests.fromText("Save").waitAndTap();+ await Tests.fromId("floating-save-button").waitAndTap();await Tests.fromText("Notebook 1").isVisible();});@@ -187,7 +174,7 @@ describe("NOTEBOOKS", () => {await Tests.createNotebook();- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").isVisible();@@ -206,7 +193,6 @@ describe("NOTEBOOKS", () => {).element.typeText("Description of Notebook 1 (Edited)");await Tests.fromText("Save").waitAndTap();await Tests.fromText("Notebook 1 (Edited)").isVisible();- // await Tests.fromText("Description of Notebook 1 (Edited)").isVisible();});it("Move notebook to trash", async () => {@@ -217,7 +203,7 @@ describe("NOTEBOOKS", () => {await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", false);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").isVisible();await Tests.fromText("Notebook 1").element.longPress();@@ -232,7 +218,7 @@ describe("NOTEBOOKS", () => {await Tests.fromText("Notebook 1").isVisible();});- it("Move notebook to trash with notes", async () => {+ it.skip("Move notebook to trash with notes", async () => {await Tests.prepare();let note = await Tests.createNote();@@ -241,8 +227,18 @@ describe("NOTEBOOKS", () => {await Tests.fromId("sidebar-add-button").waitAndTap();await Tests.createNotebook("Notebook 1", false);- await Tests.fromId("listitem.select").waitAndTap();- await Tests.fromText("Move selected notes").waitAndTap();+ await device.pressBack();+ await Tests.fromId(notesnook.ids.note.get(0)).element.longPress();+ await Tests.sleep(500);+ await Tests.fromId("select-plus").waitAndTap();+ await Tests.fromText("Notebook 1").isVisible();+ await Tests.fromText("Notebook 1").waitAndTap();+ await Tests.fromId("floating-save-button").waitAndTap();+ await Tests.sleep(500);+ await Tests.openSideMenu();+ await Tests.fromId("tab-home").waitAndTap();+ await Tests.fromId("tab-notebooks").waitAndTap();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").isVisible();await Tests.fromText("Notebook 1").element.longPress();await Tests.sleep(500);@@ -269,7 +265,7 @@ describe("NOTEBOOKS", () => {await Tests.createNotebook("Notebook 1", false);- await device.pressBack();+ await Tests.sleep(500);await Tests.fromText("Notebook 1").isVisible();diff --git a/apps/mobile/e2e/tests/search.e2e.ts b/apps/mobile/e2e/tests/search.e2e.tsindex 7a3912a23..bbc7229f4 100644--- a/apps/mobile/e2e/tests/search.e2e.ts+++ b/apps/mobile/e2e/tests/search.e2e.ts@@ -25,9 +25,7 @@ describe("Search", () => {let note = await Tests.createNote();await Tests.fromId("search-header").waitAndTap();await Tests.fromId("search-input").element.typeText("Test");- await Tests.fromText(note.body).waitAndTap();- await device.pressBack();- await device.pressBack();- await Tests.fromText(note.body).isVisible();+ await Tests.sleep(1000);+ await Tests.fromText("1").isVisible();});});diff --git a/apps/mobile/e2e/tests/sort.e2e.ts b/apps/mobile/e2e/tests/sort.e2e.tsindex ed97df20d..2eab6d4d9 100644--- a/apps/mobile/e2e/tests/sort.e2e.ts+++ b/apps/mobile/e2e/tests/sort.e2e.ts@@ -22,6 +22,7 @@ import { Tests } from "./utils";async function sortBy(sorting: string) {await Tests.fromId("icon-sort").waitAndTap();+ await Tests.sleep(500);await Tests.fromText(sorting).waitAndTap();await device.pressBack();}@@ -38,12 +39,12 @@ describe("Sort & filter", () => {.element(by.web.className("ProseMirror")).typeText("Edited ", true);await device.pressBack();- await device.pressBack();await sortBy("Date created");await Tests.fromId(notesnook.listitem.menu).waitAndTap();await device.pressBack();await sortBy("Date edited");await Tests.fromId(notesnook.listitem.menu).waitAndTap();+ await Tests.sleep(500);await device.pressBack();});diff --git a/apps/mobile/e2e/tests/utils.ts b/apps/mobile/e2e/tests/utils.tsindex 9e0dc7905..799b9b3c8 100644--- a/apps/mobile/e2e/tests/utils.ts+++ b/apps/mobile/e2e/tests/utils.ts@@ -72,6 +72,7 @@ class Element {const Tests = {awaitLaunch: async () => {+ await device.disableSynchronization();await waitFor(element(by.id(notesnook.ids.default.root))).toBeVisible()//@ts-ignore@@ -147,4 +148,170 @@ const Tests = {}};-export { Element, Tests };+class TestBuilder {+ private steps: (() => Promise<void> | void)[] = [];+ private result: any;++ constructor() {}++ addStep(step: () => Promise<void> | void) {+ this.steps.push(step);+ return this;+ }++ awaitLaunch() {+ return this.addStep(async () => {+ this.result = await Tests.awaitLaunch();+ });+ }++ wait(duration: number) {+ return this.addStep(() => {+ this.result = Tests.sleep(duration);+ });+ }++ fromId(id: string) {+ return this.addStep(() => {+ this.result = Tests.fromId(id);+ });+ }++ fromText(text: string) {+ return this.addStep(() => {+ this.result = Tests.fromText(text);+ });+ }++ exitEditor() {+ return this.addStep(async () => {+ this.result = await Tests.exitEditor();+ });+ }++ createNote(title?: string, body?: string) {+ return this.addStep(async () => {+ this.result = await Tests.createNote(title, body);+ });+ }++ navigate(screen: RouteName | ({} & string)) {+ return this.addStep(async () => {+ this.result = await Tests.navigate(screen);+ });+ }++ openSideMenu() {+ return this.addStep(async () => {+ this.result = await Tests.openSideMenu();+ });+ }++ prepare() {+ return this.addStep(async () => {+ this.result = await Tests.prepare();+ });+ }++ createNotebook(title = "Notebook 1", description = true) {+ return this.addStep(async () => {+ this.result = await Tests.createNotebook(title, description);+ });+ }++ matchSnapshot(element: Element, name: string) {+ return this.addStep(async () => {+ this.result = await Tests.matchSnapshot(element, name);+ });+ }++ isVisibleById(id: string, timeout?: number) {+ return this.addStep(async () => {+ const element = new Element("id", id);+ this.result = await element.isVisible(timeout);+ });+ }++ isVisibleByText(text: string, timeout?: number) {+ return this.addStep(async () => {+ const element = new Element("text", text);+ this.result = await element.isVisible(timeout);+ });+ }++ isNotVisibleById(id: string, timeout?: number) {+ return this.addStep(async () => {+ const element = new Element("id", id);+ this.result = await element.isNotVisible(timeout);+ });+ }++ isNotVisibleByText(text: string, timeout?: number) {+ return this.addStep(async () => {+ const element = new Element("text", text);+ this.result = await element.isNotVisible(timeout);+ });+ }++ waitAndTapById(id: string, timeout?: number) {+ return this.addStep(async () => {+ const element = new Element("id", id);+ this.result = await element.waitAndTap(timeout);+ });+ }++ waitAndTapByText(text: string, timeout?: number) {+ return this.addStep(async () => {+ const element = new Element("text", text);+ this.result = await element.waitAndTap(timeout);+ });+ }++ tapById(id: string, point?: Detox.Point2D) {+ return this.addStep(async () => {+ const element = new Element("id", id);+ this.result = await element.tap(point);+ });+ }++ tapByText(text: string, point?: Detox.Point2D) {+ return this.addStep(async () => {+ const element = new Element("text", text);+ this.result = await element.tap(point);+ });+ }++ processResult(callback: (result: any) => void) {+ return this.addStep(async () => {+ if (this.result !== undefined) {+ callback(this.result);+ this.result = undefined; // Clear the result after processing+ } else {+ throw new Error("No result to process.");+ }+ });+ }++ pressBack(count = 1) {+ return this.addStep(async () => {+ for (let i = 0; i < count; i++) {+ await device.pressBack();+ }+ });+ }++ async run() {+ for (const step of this.steps) {+ const result = step();+ if (result instanceof Promise) {+ await result;+ }+ }+ this.steps = []; // Clear steps after execution+ }+ static create() {+ return new TestBuilder();+ }+}++export { Element, Tests, TestBuilder };diff --git a/apps/mobile/e2e/tests/vault.e2e.ts b/apps/mobile/e2e/tests/vault.e2e.tsindex 92d2cf9db..f3cbb3e59 100644--- a/apps/mobile/e2e/tests/vault.e2e.ts+++ b/apps/mobile/e2e/tests/vault.e2e.ts@@ -56,8 +56,10 @@ async function openLockedNote(pwd?: string) {}async function goToPrivacySecuritySettings() {- await Tests.navigate("Settings");+ await Tests.openSideMenu();+ await Tests.fromId("sidemenu-settings-icon").waitAndTap();await Tests.sleep(300);+ await Tests.fromText("Settings").waitAndTap();await Tests.fromText("Vault").waitAndTap();}@@ -91,6 +93,7 @@ describe("VAULT", () => {await Tests.fromText("Change").waitAndTap();await device.pressBack();await device.pressBack();+ await device.pressBack();await Tests.sleep(500);await openLockedNote("2362");});@@ -109,6 +112,7 @@ describe("VAULT", () => {await Tests.fromText("Create vault").isVisible();await device.pressBack();await device.pressBack();+ await device.pressBack();await Tests.fromId(notesnook.listitem.menu).isVisible();});@@ -127,6 +131,7 @@ describe("VAULT", () => {await Tests.fromText("Create vault").isVisible();await device.pressBack();await device.pressBack();+ await device.pressBack();await Tests.fromId(notesnook.listitem.menu).isNotVisible();});diff --git a/apps/mobile/native/android/app/build.gradle b/apps/mobile/native/android/app/build.gradleindex 61875e411..bb31c3ae4 100644--- a/apps/mobile/native/android/app/build.gradle+++ b/apps/mobile/native/android/app/build.gradle@@ -124,7 +124,7 @@ android {minSdkVersion rootProject.ext.minSdkVersiontargetSdkVersion rootProject.ext.targetSdkVersionmultiDexEnabled true- versionCode 3068+ versionCode 3069versionName getNpmVersion()testBuildType System.getProperty('testBuildType', 'debug')testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'diff --git a/apps/mobile/native/android/app/src/main/AndroidManifest.xml b/apps/mobile/native/android/app/src/main/AndroidManifest.xmlindex 920363b81..7bbf71bca 100644--- a/apps/mobile/native/android/app/src/main/AndroidManifest.xml+++ b/apps/mobile/native/android/app/src/main/AndroidManifest.xml@@ -65,7 +65,6 @@android:icon="@mipmap/ic_launcher"android:label="@string/app_name"android:largeHeap="true"- android:networkSecurityConfig="@xml/network_security_config"android:requestLegacyExternalStorage="true"android:supportsRtl="true"android:theme="@style/BootTheme">diff --git a/apps/mobile/native/android/app/src/release/AndroidManifest.xml b/apps/mobile/native/android/app/src/release/AndroidManifest.xmlnew file mode 100644index 000000000..a819fb7e0--- /dev/null+++ b/apps/mobile/native/android/app/src/release/AndroidManifest.xml@@ -0,0 +1,7 @@+<?xml version="1.0" encoding="utf-8"?>+<manifest xmlns:android="http://schemas.android.com/apk/res/android"+ xmlns:tools="http://schemas.android.com/tools">++ <application android:networkSecurityConfig="@xml/network_security_config">+ </application>+</manifest>diff --git a/apps/mobile/native/android/releasenotes/whatsnew-en-US b/apps/mobile/native/android/releasenotes/whatsnew-en-USindex 16e43c866..cf2e75261 100644--- a/apps/mobile/native/android/releasenotes/whatsnew-en-US+++ b/apps/mobile/native/android/releasenotes/whatsnew-en-US@@ -1,5 +1,5 @@-- Improved editor UI for better usability-- Improved UX for creating and editing reminders+- We have launches new pricing plans, Essential, Pro and Believer+- Free users can now upload attachments and create private vault- Minor bug fixes and improvementsThank you for using Notesnook!\ No newline at end of filediff --git a/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxproj b/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxprojindex 2e1daccc8..344c334d6 100644--- a/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxproj+++ b/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxproj@@ -1089,7 +1089,7 @@CODE_SIGN_IDENTITY = "Apple Development";"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 2147;+ CURRENT_PROJECT_VERSION = 2148;DEVELOPMENT_TEAM = 53CWBG3QUC;ENABLE_BITCODE = NO;"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;@@ -1163,7 +1163,7 @@"$(inherited)","@executable_path/Frameworks",);- MARKETING_VERSION = 3.2.12;+ MARKETING_VERSION = 3.3.0;OTHER_LDFLAGS = ("$(inherited)","-ObjC",@@ -1194,7 +1194,7 @@CODE_SIGN_IDENTITY = "Apple Development";"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";CODE_SIGN_STYLE = Manual;- CURRENT_PROJECT_VERSION = 2147;+ CURRENT_PROJECT_VERSION = 2148;DEVELOPMENT_TEAM = "";"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;@@ -1268,7 +1268,7 @@"$(inherited)","@executable_path/Frameworks",);- MARKETING_VERSION = 3.2.12;+ MARKETING_VERSION = 3.3.0;ONLY_ACTIVE_ARCH = NO;OTHER_LDFLAGS = ("$(inherited)",@@ -1427,7 +1427,7 @@CODE_SIGN_IDENTITY = "Apple Development";"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 2147;+ CURRENT_PROJECT_VERSION = 2148;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = 53CWBG3QUC;"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;@@ -1439,7 +1439,7 @@"@executable_path/Frameworks","@executable_path/../../Frameworks",);- MARKETING_VERSION = 3.2.12;+ MARKETING_VERSION = 3.3.0;MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;@@ -1470,7 +1470,7 @@"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";CODE_SIGN_STYLE = Manual;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 2147;+ CURRENT_PROJECT_VERSION = 2148;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = "";"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;@@ -1483,7 +1483,7 @@"@executable_path/Frameworks","@executable_path/../../Frameworks",);- MARKETING_VERSION = 3.2.12;+ MARKETING_VERSION = 3.3.0;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;PRODUCT_NAME = "$(TARGET_NAME)";@@ -1513,7 +1513,7 @@CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";CODE_SIGN_IDENTITY = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 2147;+ CURRENT_PROJECT_VERSION = 2148;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = 53CWBG3QUC;"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;@@ -1594,7 +1594,7 @@"@executable_path/../../Frameworks",);LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift$(inherited)";- MARKETING_VERSION = 3.2.12;+ MARKETING_VERSION = 3.3.0;MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;@@ -1625,7 +1625,7 @@"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";CODE_SIGN_STYLE = Manual;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 2147;+ CURRENT_PROJECT_VERSION = 2148;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = "";"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;@@ -1707,7 +1707,7 @@"@executable_path/../../Frameworks",);LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift$(inherited)";- MARKETING_VERSION = 3.2.12;+ MARKETING_VERSION = 3.3.0;MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;PRODUCT_NAME = "$(TARGET_NAME)";diff --git a/apps/mobile/native/react-native.config.js b/apps/mobile/native/react-native.config.jsindex a257982b1..d29dc5665 100644--- a/apps/mobile/native/react-native.config.js+++ b/apps/mobile/native/react-native.config.js@@ -1,7 +1,7 @@const isGithubRelease = false;const config = {- // commands: require('@callstack/repack/commands/rspack'),+ commands: require('@callstack/repack/commands/rspack'),project: {android: {sourceDir: './android'diff --git a/apps/mobile/package.json b/apps/mobile/package.jsonindex 1da120586..2ac4cb620 100644--- a/apps/mobile/package.json+++ b/apps/mobile/package.json@@ -1,6 +1,6 @@{"name": "@notesnook/mobile",- "version": "3.2.12",+ "version": "3.3.0","private": true,"license": "GPL-3.0-or-later","workspaces": [diff --git a/fastlane/metadata/android/en-US/changelogs/15349.txt b/fastlane/metadata/android/en-US/changelogs/15349.txtnew file mode 100644index 000000000..cf2e75261--- /dev/null+++ b/fastlane/metadata/android/en-US/changelogs/15349.txt@@ -0,0 +1,5 @@+- We have launches new pricing plans, Essential, Pro and Believer+- Free users can now upload attachments and create private vault+- Minor bug fixes and improvements++Thank you for using Notesnook!\ No newline at end of file