refac
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
import { createNewFolder, getFolders, updateFolderParentIdById } from '$lib/apis/folders';
|
import { createNewFolder, getFolders, updateFolderParentIdById } from '$lib/apis/folders';
|
||||||
import { checkActiveChats } from '$lib/apis/tasks';
|
import { checkActiveChats } from '$lib/apis/tasks';
|
||||||
import { getPinnedNoteList, toggleNotePinnedStatusById } from '$lib/apis/notes';
|
import { getPinnedNoteList, toggleNotePinnedStatusById } from '$lib/apis/notes';
|
||||||
|
import { createNoteHandler } from '$lib/components/notes/utils';
|
||||||
import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
|
import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
|
||||||
|
|
||||||
import ArchivedChatsModal from './ArchivedChatsModal.svelte';
|
import ArchivedChatsModal from './ArchivedChatsModal.svelte';
|
||||||
@@ -1090,6 +1091,13 @@
|
|||||||
name={$i18n.t('Notes')}
|
name={$i18n.t('Notes')}
|
||||||
chevron={false}
|
chevron={false}
|
||||||
dragAndDrop={false}
|
dragAndDrop={false}
|
||||||
|
onAdd={async () => {
|
||||||
|
const note = await createNoteHandler('New Note');
|
||||||
|
if (note) {
|
||||||
|
goto(`/notes/${note.id}`);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onAddLabel={$i18n.t('New Note')}
|
||||||
>
|
>
|
||||||
<div class="mt-0.5 pb-1.5">
|
<div class="mt-0.5 pb-1.5">
|
||||||
{#each $pinnedNotes as note (note.id)}
|
{#each $pinnedNotes as note (note.id)}
|
||||||
|
|||||||
Reference in New Issue
Block a user