mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-26 01:10:37 -04:00
fix: stop the browser back button creating extra notes (#29645)
This commit is contained in:
@@ -534,7 +534,7 @@
|
||||
{
|
||||
label: $i18n.t('Create a new note'),
|
||||
onClick: async () => {
|
||||
await goto(`/notes?content=${query}`);
|
||||
await goto(`/notes/new?content=${encodeURIComponent(query)}`);
|
||||
show = false;
|
||||
onClose();
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
const res = await createNoteHandler(title, content);
|
||||
|
||||
if (res) {
|
||||
goto(`/notes/${res.id}`);
|
||||
goto(`/notes/${res.id}`, { replaceState: true });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
const res = await createNoteHandler(title, content);
|
||||
|
||||
if (res) {
|
||||
goto(`/notes/${res.id}`);
|
||||
goto(`/notes/${res.id}`, { replaceState: true });
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user