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: use createInternalLink everywhere
Abdullah Attab40fe805e7e6
diff --git a/apps/mobile/app/hooks/use-actions.tsx b/apps/mobile/app/hooks/use-actions.tsxindex 0cd068e28..ef58f8227 100644--- a/apps/mobile/app/hooks/use-actions.tsx+++ b/apps/mobile/app/hooks/use-actions.tsx@@ -66,6 +66,7 @@ import { deleteItems } from "../utils/functions";import { convertNoteToText } from "../utils/note-to-text";import { sleep } from "../utils/time";import { ReferencesList } from "../components/sheets/references";+import { createInternalLink } from "@notesnook/core";export const useActions = ({close,@@ -808,10 +809,10 @@ export const useActions = ({title: "Copy link",icon: "link",func: () => {- Clipboard.setString(`nn://note/${item.id}`);+ Clipboard.setString(createInternalLink("note", item.id));ToastManager.show({heading: "Note link copied",- message: `nn://note/${item.id}`,+ message: createInternalLink("note", item.id),context: "local",type: "success"});diff --git a/apps/web/src/components/properties/index.tsx b/apps/web/src/components/properties/index.tsxindex 5c0cb2659..94bbb95a7 100644--- a/apps/web/src/components/properties/index.tsx+++ b/apps/web/src/components/properties/index.tsx@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import React, { PropsWithChildren, useRef, useState } from "react";+import React, { PropsWithChildren, useState } from "react";import {Pin,StarOutline,@@ -54,8 +54,10 @@ import { VirtualizedList } from "../virtualized-list";import { SessionItem } from "../session-item";import {ContentBlock,+ DefaultColors,Note,VirtualizedGrouping,+ createInternalLink,highlightInternalLinks} from "@notesnook/core";import { VirtualizedTable } from "../virtualized-table";@@ -454,7 +456,9 @@ function ReferencedIn({const blocks = await db.notes.contentBlocks(item.id);setBlocks(blocks- .filter((b) => b.content.includes(`nn://note/${noteId}`))+ .filter((b) =>+ b.content.includes(createInternalLink("note", noteId))+ ).map((block) => ({id: block.id,links: highlightInternalLinks(block, noteId)