mirror of
https://github.com/open-webui/open-webui
synced 2025-03-05 03:48:55 +00:00
refac
This commit is contained in:
parent
e90e254575
commit
737b1723c7
@ -129,6 +129,7 @@
|
|||||||
export let isLastMessage = true;
|
export let isLastMessage = true;
|
||||||
export let readOnly = false;
|
export let readOnly = false;
|
||||||
|
|
||||||
|
let buttonsContainerElement: HTMLDivElement;
|
||||||
let showDeleteConfirm = false;
|
let showDeleteConfirm = false;
|
||||||
|
|
||||||
let model = null;
|
let model = null;
|
||||||
@ -518,6 +519,18 @@
|
|||||||
// console.log('ResponseMessage mounted');
|
// console.log('ResponseMessage mounted');
|
||||||
|
|
||||||
await tick();
|
await tick();
|
||||||
|
if (buttonsContainerElement) {
|
||||||
|
console.log(buttonsContainerElement);
|
||||||
|
buttonsContainerElement.addEventListener('wheel', function (event) {
|
||||||
|
// console.log(event.deltaY);
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
if (event.deltaY !== 0) {
|
||||||
|
// Adjust horizontal scroll position based on vertical scroll
|
||||||
|
buttonsContainerElement.scrollLeft += event.deltaY;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -802,10 +815,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if !edit}
|
{#if !edit}
|
||||||
{#if message.done || siblings.length > 1}
|
|
||||||
<div
|
<div
|
||||||
|
bind:this={buttonsContainerElement}
|
||||||
class="flex justify-start overflow-x-auto buttons text-gray-600 dark:text-gray-500 mt-0.5"
|
class="flex justify-start overflow-x-auto buttons text-gray-600 dark:text-gray-500 mt-0.5"
|
||||||
>
|
>
|
||||||
|
{#if message.done || siblings.length > 1}
|
||||||
{#if siblings.length > 1}
|
{#if siblings.length > 1}
|
||||||
<div class="flex self-center min-w-fit" dir="ltr">
|
<div class="flex self-center min-w-fit" dir="ltr">
|
||||||
<button
|
<button
|
||||||
@ -1313,7 +1327,6 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if message.done && showRateComment}
|
{#if message.done && showRateComment}
|
||||||
@ -1327,6 +1340,7 @@
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user