diff --git a/src/lib/components/notes/Notes.svelte b/src/lib/components/notes/Notes.svelte index 14f1392625..43d7bb6e36 100644 --- a/src/lib/components/notes/Notes.svelte +++ b/src/lib/components/notes/Notes.svelte @@ -101,30 +101,6 @@ }); }; - const createNoteHandler = async (content?: string) => { - // $i18n.t('New Note'), - const res = await createNewNote(localStorage.token, { - // YYYY-MM-DD - title: dayjs().format('YYYY-MM-DD'), - data: { - content: { - json: null, - html: content ?? '', - md: content ?? '' - } - }, - meta: null, - access_control: {} - }).catch((error) => { - toast.error(`${error}`); - return null; - }); - - if (res) { - goto(`/notes/${res.id}`); - } - }; - const downloadHandler = async (type) => { if (type === 'txt') { const blob = new Blob([selectedNote.data.content.md], { type: 'text/plain' }); @@ -241,12 +217,6 @@ }); onMount(async () => { - if ($page.url.searchParams.get('content') !== null) { - const content = $page.url.searchParams.get('content') ?? ''; - createNoteHandler(content); - return; - } - await init(); loaded = true; diff --git a/src/routes/(app)/notes/+page.svelte b/src/routes/(app)/notes/+page.svelte index 8a57e18c16..759f16e018 100644 --- a/src/routes/(app)/notes/+page.svelte +++ b/src/routes/(app)/notes/+page.svelte @@ -1,87 +1,116 @@ -