diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 0494281e32..70a2db0d24 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -78,6 +78,7 @@ import FolderModal from './Sidebar/Folders/FolderModal.svelte'; import Sidebar from '../icons/Sidebar.svelte'; import PinnedModelList from './Sidebar/PinnedModelList.svelte'; + import PinnedNoteList from './Sidebar/PinnedNoteList.svelte'; import Note from '../icons/Note.svelte'; import Code from '../icons/Code.svelte'; import { slide } from 'svelte/transition'; @@ -1257,51 +1258,7 @@ }} onAddLabel={$i18n.t('New Note')} > -
- {#each $pinnedNotes as note (note.id)} - { - itemClickHandler(); - }} - draggable="false" - > -
- -
-
- {note.title} -
- -
- {/each} -
+ {/if} diff --git a/src/lib/components/layout/Sidebar/PinnedNoteList.svelte b/src/lib/components/layout/Sidebar/PinnedNoteList.svelte new file mode 100644 index 0000000000..f9eb77a3c3 --- /dev/null +++ b/src/lib/components/layout/Sidebar/PinnedNoteList.svelte @@ -0,0 +1,99 @@ + + +
+ {#each sortedPinnedNotes as note (note.id)} + +
+ { + selectedChatId = null; + chatId.set(''); + if ($mobile) { + showSidebar.set(false); + } + }} + draggable="false" + > +
+ +
+
+ {note.title} +
+
+ +
+ {/each} +
diff --git a/src/lib/stores/index.ts b/src/lib/stores/index.ts index 5910a98495..381e14048a 100644 --- a/src/lib/stores/index.ts +++ b/src/lib/stores/index.ts @@ -234,6 +234,7 @@ type Settings = { renderMarkdownInAssistantMessages?: boolean; recentEmojis?: string[]; pinnedMenuItems?: string[]; + pinnedNotesOrder?: string[]; system?: string; seed?: number;