mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
fix: create new note
This commit is contained in:
parent
6593b7ccc8
commit
23ea754061
2 changed files with 4 additions and 6 deletions
|
|
@ -233,7 +233,7 @@
|
||||||
{
|
{
|
||||||
label: $i18n.t('Create a new note'),
|
label: $i18n.t('Create a new note'),
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await goto(`/notes${query ? `?content=${query}` : ''}`);
|
await goto(`/notes?content=${query}`);
|
||||||
show = false;
|
show = false;
|
||||||
onClose();
|
onClose();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -303,12 +303,10 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if ($page.url.searchParams.get('content')) {
|
if ($page.url.searchParams.get('content') !== null) {
|
||||||
const content = $page.url.searchParams.get('content') ?? '';
|
const content = $page.url.searchParams.get('content') ?? '';
|
||||||
if (content) {
|
createNoteHandler(content);
|
||||||
createNoteHandler(content);
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await init();
|
await init();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue