mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-06 02:48:04 +00:00
fix(notes): sync pinned note state in sidebar and editor menu (#25918)
This commit is contained in:
parent
25090dbf17
commit
2b9b956dad
1 changed files with 5 additions and 1 deletions
|
|
@ -219,6 +219,10 @@
|
|||
}).catch((e) => {
|
||||
toast.error(`${e}`);
|
||||
});
|
||||
|
||||
if (res) {
|
||||
pinnedNotes.set(await getPinnedNoteList(localStorage.token).catch(() => []));
|
||||
}
|
||||
}, 200);
|
||||
};
|
||||
|
||||
|
|
@ -1092,7 +1096,7 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
|||
onDelete={() => {
|
||||
showDeleteConfirm = true;
|
||||
}}
|
||||
isPinned={note.is_pinned ?? false}
|
||||
isPinned={$pinnedNotes.some((n) => n.id === note.id)}
|
||||
onPin={async () => {
|
||||
await toggleNotePinnedStatusById(localStorage.token, note.id);
|
||||
note = await getNoteById(localStorage.token, note.id);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue