mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
fix: copy code button issue
This commit is contained in:
parent
566698a006
commit
abbfd1dc58
@ -40,7 +40,7 @@
|
|||||||
blocks.forEach((block) => {
|
blocks.forEach((block) => {
|
||||||
// only add button if browser supports Clipboard API
|
// only add button if browser supports Clipboard API
|
||||||
|
|
||||||
if (navigator.clipboard && block.childNodes.length < 2) {
|
if (navigator.clipboard && block.childNodes.length < 2 && block.id !== 'user-message') {
|
||||||
let code = block.querySelector('code');
|
let code = block.querySelector('code');
|
||||||
code.style.borderTopRightRadius = 0;
|
code.style.borderTopRightRadius = 0;
|
||||||
code.style.borderTopLeftRadius = 0;
|
code.style.borderTopLeftRadius = 0;
|
||||||
@ -425,7 +425,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<pre class="">{message.content}</pre>
|
<pre id="user-message">{message.content}</pre>
|
||||||
|
|
||||||
<div class=" flex justify-start space-x-1">
|
<div class=" flex justify-start space-x-1">
|
||||||
{#if message.parentId !== null && message.parentId in history.messages && (history.messages[message.parentId]?.childrenIds.length ?? 0) > 1}
|
{#if message.parentId !== null && message.parentId in history.messages && (history.messages[message.parentId]?.childrenIds.length ?? 0) > 1}
|
||||||
|
Loading…
Reference in New Issue
Block a user