mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 08:56:39 +00:00
add isFirstMessage prop to UserMessage component
This commit is contained in:
parent
c3ed6fe974
commit
32c7971300
@ -239,6 +239,7 @@
|
||||
<UserMessage
|
||||
user={$user}
|
||||
{message}
|
||||
isFirstMessage={messageIdx === 0}
|
||||
siblings={message.parentId !== null
|
||||
? history.messages[message.parentId]?.childrenIds ?? []
|
||||
: Object.values(history.messages)
|
||||
|
@ -9,6 +9,7 @@
|
||||
export let user;
|
||||
export let message;
|
||||
export let siblings;
|
||||
export let isFirstMessage: boolean;
|
||||
|
||||
export let confirmEditMessage: Function;
|
||||
export let showPreviousMessage: Function;
|
||||
@ -282,11 +283,11 @@
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- {#if not first message }
|
||||
{#if !isFirstMessage}
|
||||
<button
|
||||
class="invisible group-hover:visible p-1 rounded dark:hover:text-white transition"
|
||||
on:click={() => {
|
||||
// delete message
|
||||
// TODO delete message
|
||||
}}
|
||||
>
|
||||
<svg
|
||||
@ -304,7 +305,7 @@
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
{/if} -->
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user