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
web: support colornote importer (#9985)
01zulfi0922d9d83369
diff --git a/apps/web/src/components/importer/components/file-provider-handler.tsx b/apps/web/src/components/importer/components/file-provider-handler.tsxindex ec2aabbfb..0774a880b 100644--- a/apps/web/src/components/importer/components/file-provider-handler.tsx+++ b/apps/web/src/components/importer/components/file-provider-handler.tsx@@ -30,9 +30,11 @@ import { xxhash64 } from "hash-wasm";import { useCallback, useEffect, useRef, useState } from "react";import { useDropzone } from "react-dropzone";import { importNote } from "../../../utils/importer";+import { PromptDialog } from "../../../dialogs/prompt";import Accordion from "../../accordion";import { TransformResult } from "../types";import { useStore as useAppStore } from "../../../stores/app-store";+import { strings } from "@notesnook/intl";type FileProviderHandlerProps = {provider: IFileProvider;@@ -103,6 +105,17 @@ export function FileProviderHandler(props: FileProviderHandlerProps) {},reporter: () => {setTotalNoteCount(++totalNotes);+ },+ options: {+ colornote: {+ getPassword: async (filename: string) => {+ const password = await PromptDialog.show({+ title: strings.colorNotePasswordFor(filename),+ description: strings.colorNotPasswordForDesc()+ });+ return password || undefined;+ }+ }}};@@ -224,6 +237,7 @@ export function FileProviderHandler(props: FileProviderHandlerProps) {</Text></Text></Flex>+{files.length > 0 ? (<AccordionisCloseddiff --git a/apps/web/src/utils/importer.ts b/apps/web/src/utils/importer.tsindex 1b01c482f..518ae64fb 100644--- a/apps/web/src/utils/importer.ts+++ b/apps/web/src/utils/importer.ts@@ -114,6 +114,10 @@ async function processNote(if (!noteId) return;+ if (note.archived) {+ await db.notes.archive(true, noteId);+ }+for (const tag of note.tags || []) {const tagId =(await db.tags.find(tag))?.id ||@@ -162,6 +166,24 @@ async function processNote(for (const notebookId of notebookIds)await db.notes.addToNotebook(notebookId, noteId);}++ if (note.reminder) {+ const reminderId = await db.reminders.add({+ recurringMode: note.reminder.recurringMode,+ mode: note.reminder.mode,+ selectedDays: note.reminder.selectedDays,+ date: note.reminder.date,+ title: note.reminder.title,+ description: note.reminder.description+ });++ if (reminderId) {+ await db.relations.add(+ { id: noteId, type: "note" },+ { id: reminderId, type: "reminder" }+ );+ }+ }}async function importNotebook(diff --git a/docs/help/contents/importing-notes/import-notes-from-colornote.md b/docs/help/contents/importing-notes/import-notes-from-colornote.mdnew file mode 100644index 000000000..eedb917eb--- /dev/null+++ b/docs/help/contents/importing-notes/import-notes-from-colornote.md@@ -0,0 +1,15 @@+---+title: ColorNote+---++# How to import notes from ColorNote notes app?++The following steps will help you import your notes from ColorNote easily.++1. Download the ColorNote mobile app.+2. Go to `Settings > Backup` and create a backup. Make sure to remember the password you set while creating the backup as it will be needed during import.+3. Open the Notesnook app (web or desktop).+4. Go to `Settings > Notesnook Importer` and select `ColorNote` from list of apps.+5. Drop the backup file you exported earlier in the box or click anywhere to open system file picker to select the backup.+7. Click on "Start importing" and enter the password you used while creating the backup in the popup.+8. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).\ No newline at end of filediff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.poindex ded5131af..324901fff 100644--- a/packages/intl/locale/en.po+++ b/packages/intl/locale/en.po@@ -6,6 +6,12 @@ msgstr """Content-Transfer-Encoding: 8bit\n""X-Generator: @lingui/cli\n""Language: en\n"+"Project-Id-Version: \n"+"Report-Msgid-Bugs-To: \n"+"PO-Revision-Date: \n"+"Last-Translator: \n"+"Language-Team: \n"+"Plural-Forms: \n"#: src/strings.ts:2423msgid " \"Notebook > Notes\""@@ -1796,6 +1802,10 @@ msgstr "Color scheme"msgid "Color title"msgstr "Color title"+#: src/strings.ts:2796+msgid "Colornote password for {filename}"+msgstr "Colornote password for {filename}"+#: src/strings.ts:309msgid "colors"msgstr "colors"@@ -6878,6 +6888,10 @@ msgstr "The information above will be publically available at"msgid "The Notesnook Circle is exclusive to subscribers. Please consider subscribing to gain access to Notesnook Circle and enjoy additional benefits."msgstr "The Notesnook Circle is exclusive to subscribers. Please consider subscribing to gain access to Notesnook Circle and enjoy additional benefits."+#: src/strings.ts:2798+msgid "The password for decrypting the Colornote backup file."+msgstr "The password for decrypting the Colornote backup file."+#: src/strings.ts:2094msgid "The password/pin for unlocking the app."msgstr "The password/pin for unlocking the app."diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.poindex 9122bc479..71315b607 100644--- a/packages/intl/locale/pseudo-LOCALE.po+++ b/packages/intl/locale/pseudo-LOCALE.po@@ -6,6 +6,12 @@ msgstr """Content-Transfer-Encoding: 8bit\n""X-Generator: @lingui/cli\n""Language: pseudo-LOCALE\n"+"Project-Id-Version: \n"+"Report-Msgid-Bugs-To: \n"+"PO-Revision-Date: \n"+"Last-Translator: \n"+"Language-Team: \n"+"Plural-Forms: \n"#: src/strings.ts:2423msgid " \"Notebook > Notes\""@@ -1785,6 +1791,10 @@ msgstr ""msgid "Color title"msgstr ""+#: src/strings.ts:2796+msgid "Colornote password for {filename}"+msgstr ""+#: src/strings.ts:309msgid "colors"msgstr ""@@ -6835,6 +6845,10 @@ msgstr ""#: src/strings.ts:2619msgid "The Notesnook Circle is exclusive to subscribers. Please consider subscribing to gain access to Notesnook Circle and enjoy additional benefits."+msgstr "<<<<<<< HEAD"++#: src/strings.ts:2798+msgid "The password for decrypting the Colornote backup file."msgstr ""#: src/strings.ts:2094diff --git a/packages/intl/src/strings.ts b/packages/intl/src/strings.tsindex cba2d595f..93f273590 100644--- a/packages/intl/src/strings.ts+++ b/packages/intl/src/strings.ts@@ -2791,5 +2791,9 @@ Continue without attachments?`,setupInboxKeys: () => t`Setup inbox keys`,enterPgpPublicKey: () => t`Enter your PGP public key`,enterPgpPrivateKey: () => t`Enter your PGP private key`,- expiryDateRemoved: () => t`Expiry date removed`+ expiryDateRemoved: () => t`Expiry date removed`,+ colorNotePasswordFor: (filename: string) =>+ t`Colornote password for ${filename}`,+ colorNotPasswordForDesc: () =>+ t`The password for decrypting the Colornote backup file.`};