This commit is contained in:
team 1
2026-05-07 16:42:01 +02:00
parent 734134c209
commit 9520807e65
2 changed files with 25 additions and 7 deletions

View File

@@ -264,13 +264,6 @@ document.addEventListener('DOMContentLoaded', () => {
const msg = document.createElement('div');
msg.className = 'message ' + role;
if (role === "user") {
const svg = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chat-right-fill" viewBox="0 0 16 16">\n' +
' <path d="M14 0a2 2 0 0 1 2 2v12.793a.5.5 0 0 1-.854.353l-2.853-2.853a1 1 0 0 0-.707-.293H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z"/>\n' +
'</svg>';
html = svg + ' ' + html;
}
const bubble = document.createElement('div');
bubble.className = 'bubble ' + extra;
bubble.innerHTML = html;

View File

@@ -94,6 +94,8 @@ input, textarea, select {
scrollbar-color: #324054 transparent;
}
.message {
margin-bottom: .7rem;
}
@@ -105,6 +107,29 @@ input, textarea, select {
.message.user .bubble {
margin-left: auto;
color: #86b7fe;
position: relative;
}
.message.user .bubble::after {
content: "";
position: absolute;
top: 50%;
right: -10px;
transform: translateY(-50%);
width: 16px;
height: 16px;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4.414a1 1 0 0 0-.707.293L.854 15.146A.5.5 0 0 1 0 14.793zm3.5 1a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1zm0 2.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1zm0 2.5a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1z'/%3E%3C/svg%3E");
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-size: contain;
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4.414a1 1 0 0 0-.707.293L.854 15.146A.5.5 0 0 1 0 14.793zm3.5 1a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1zm0 2.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1zm0 2.5a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1z'/%3E%3C/svg%3E");
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
}
.message.assistant .bubble {