mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-12 23:02:35 +00:00
fix: open the thread when a notification toast for a thread reply is clicked (#29856)
This commit is contained in:
parent
5b0f8a73ca
commit
b198c94efb
2 changed files with 9 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
import { onDestroy, onMount, tick } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import {
|
||||
|
|
@ -48,6 +49,11 @@
|
|||
initHandler();
|
||||
}
|
||||
|
||||
$: if (channel && $page.url.searchParams.get('thread')) {
|
||||
threadId = $page.url.searchParams.get('thread');
|
||||
window.history.replaceState(history.state, '', `/channels/${id}`);
|
||||
}
|
||||
|
||||
const scrollToBottom = () => {
|
||||
if (messagesContainerElement) {
|
||||
messagesContainerElement.scrollTop = messagesContainerElement.scrollHeight;
|
||||
|
|
|
|||
|
|
@ -864,7 +864,9 @@
|
|||
toast.custom(NotificationToast, {
|
||||
componentProps: {
|
||||
onClick: () => {
|
||||
goto(`/channels/${event.channel_id}`);
|
||||
goto(
|
||||
`/channels/${event.channel_id}${data?.parent_id ? `?thread=${data.parent_id}` : ''}`
|
||||
);
|
||||
},
|
||||
content: data?.content,
|
||||
title: `${title}`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue