This commit is contained in:
Timothy Jaeryang Baek
2026-04-14 17:22:54 -05:00
parent 8bd23b9145
commit ecd74f220c
9 changed files with 307 additions and 5 deletions
+11 -2
View File
@@ -35,7 +35,8 @@
showSidebar,
socket,
user,
WEBUI_NAME
WEBUI_NAME,
pinnedNotes
} from '$lib/stores';
import { downloadPdf } from './utils';
@@ -64,7 +65,9 @@
deleteNoteById,
getNoteById,
updateNoteById,
updateNoteAccessGrants
updateNoteAccessGrants,
toggleNotePinnedStatusById,
getPinnedNoteList
} from '$lib/apis/notes';
import RichTextInput from '../common/RichTextInput.svelte';
@@ -1088,6 +1091,12 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
onDelete={() => {
showDeleteConfirm = true;
}}
isPinned={note.is_pinned ?? false}
onPin={async () => {
await toggleNotePinnedStatusById(localStorage.token, note.id);
note = await getNoteById(localStorage.token, note.id);
pinnedNotes.set(await getPinnedNoteList(localStorage.token).catch(() => []));
}}
>
<div class="p-1 bg-transparent hover:bg-white/5 transition rounded-lg">
<EllipsisHorizontal className="size-5" />